Skip to content

Commit

Permalink
Update test_offsets.py
Browse files Browse the repository at this point in the history
  • Loading branch information
elden1337 authored Sep 12, 2024
1 parent 131736a commit 07327a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/peaqhvac/test/test_offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
def test_offsets_cent_and_normal_match():
prices = P231213 + P231214
now_dt = datetime(2023, 12, 13, 20, 43, 0)
r1 = set_offset_dict(prices, now_dt, 0, {})
r1 = set_offset_dict(prices, now_dt, 0)
r2 = set_offset_dict([p * 100 for p in prices], now_dt, 0, {})
assert r1 == r2

Expand All @@ -209,7 +209,7 @@ def test_assert_cheaper_hours_tomorrow_not_lower_offset_than_today():
prices = P231218
prices_tomorrow = P231219
now_dt = datetime(2023, 12, 18, 20, 43, 0)
offset_dict = set_offset_dict(prices + prices_tomorrow, now_dt, 0, {})
offset_dict = set_offset_dict(prices + prices_tomorrow, now_dt, 0)
offs2 = offset_per_day(
all_prices=prices + prices_tomorrow,
day_values=offset_dict,
Expand Down Expand Up @@ -279,7 +279,7 @@ def test_smooth_transistions_no_weather_prog_nothing_exceeds_tolerance():
prices = P231213
prices_tomorrow = P231214
now_dt = datetime(2023, 12, 13, 20, 43, 0)
offset_dict = set_offset_dict(prices + prices_tomorrow, now_dt, 0, {})
offset_dict = set_offset_dict(prices + prices_tomorrow, now_dt, 0)
print(offset_dict)

offsets = offset_per_day(
Expand All @@ -303,7 +303,7 @@ def test_adjust_to_treshold_no_exceeding_values():
prices = P231213
prices_tomorrow = P231214
now_dt = datetime(2023, 12, 13, 20, 43, 0)
offset_dict = set_offset_dict(prices + prices_tomorrow, now_dt, 0, {})
offset_dict = set_offset_dict(prices + prices_tomorrow, now_dt, 0)

offsets = offset_per_day(
all_prices=prices + prices_tomorrow,
Expand Down

0 comments on commit 07327a1

Please sign in to comment.