Skip to content

Commit

Permalink
Freeze time without offset
Browse files Browse the repository at this point in the history
Seems to be related to: spulec/freezegun#553
  • Loading branch information
tay committed Oct 27, 2024
1 parent 60c5d27 commit bfc6b7c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions parsers/test/test_GSO.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def setUp(self) -> None:
self.session.mount("https://", self.adapter)


@freeze_time("2024-10-27 17:58:40", tz_offset=-7)
# 11am UTC on 27/10/24 = 6pm on 27/10/24
@freeze_time("2024-10-27 10:58:40")
class TestFetchProduction(TestGSO):
def test_production_with_snapshot(self):
raw_data = Path(base_path_to_mock, "currentGen.json")
Expand Down Expand Up @@ -49,7 +50,8 @@ def test_production_with_snapshot(self):
)


@freeze_time("2024-10-27 17:58:40", tz_offset=-7)
# 11am UTC on 27/10/24 = 6pm on 27/10/24
@freeze_time("2024-10-27 10:58:40")
class TestFetchConsumption(TestGSO):
def test_consumption_with_snapshot(self):
raw_data = Path(base_path_to_mock, "systemDemand.json")
Expand Down

0 comments on commit bfc6b7c

Please sign in to comment.