Skip to content

Commit

Permalink
Fix issues with timezone in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdegat01 committed Dec 19, 2023
1 parent fc268b4 commit 44b0499
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/resolution/evaluation/test_evaluate_operating_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async def test_evaluation(coresys: CoreSys):

assert operating_system.reason not in coresys.resolution.unsupported

coresys.host._info = MagicMock(operating_system="unsupported")
coresys.host._info = MagicMock(operating_system="unsupported", timezone=None)
await operating_system()
assert operating_system.reason in coresys.resolution.unsupported

Expand All @@ -26,7 +26,7 @@ async def test_evaluation(coresys: CoreSys):
assert operating_system.reason not in coresys.resolution.unsupported
coresys.os._available = False

coresys.host._info = MagicMock(operating_system=SUPPORTED_OS[0])
coresys.host._info = MagicMock(operating_system=SUPPORTED_OS[0], timezone=None)
await operating_system()
assert operating_system.reason not in coresys.resolution.unsupported

Expand Down
2 changes: 1 addition & 1 deletion tests/resolution/evaluation/test_evaluate_os_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async def test_evaluation(coresys: CoreSys):

assert agent.reason not in coresys.resolution.unsupported

coresys._host = MagicMock()
coresys._host = MagicMock(info=MagicMock(timezone=None))

coresys.host.features = [HostFeature.HOSTNAME]
await agent()
Expand Down
2 changes: 1 addition & 1 deletion tests/resolution/evaluation/test_evaluate_systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async def test_evaluation(coresys: CoreSys):

assert systemd.reason not in coresys.resolution.unsupported

coresys._host = MagicMock()
coresys._host = MagicMock(info=MagicMock(timezone=None))

coresys.host.features = [HostFeature.HOSTNAME]
await systemd()
Expand Down

0 comments on commit 44b0499

Please sign in to comment.