Skip to content

Commit a3340a4

Browse files
committed
Adapt test 5
1 parent 70d58f6 commit a3340a4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_usb.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,20 +1138,20 @@ def test_pulse_collection_consumption(
11381138
) == (300, pulse_update_6)
11391139
assert tst_consumption.collected_pulses(
11401140
fixed_this_hour, is_consumption=True
1141-
) == (45 + 2222, pulse_update_3)
1141+
) == (300 + 2222, pulse_update_6)
11421142

11431143
# Test log rollover by updating log first before updating pulses
11441144
tst_consumption.add_log(100, 3, (fixed_this_hour + td(hours=2)), 3333)
11451145
assert tst_consumption.log_rollover
11461146
assert tst_consumption.collected_pulses(
11471147
fixed_this_hour, is_consumption=True
1148-
) == (45+ 2222 + 3333, pulse_update_3)
1149-
pulse_update_6 = fixed_this_hour + td(hours=2, seconds=10)
1150-
tst_consumption.update_pulse_counter(321, 0, pulse_update_6)
1148+
) == (300 + 2222 + 3333, pulse_update_6)
1149+
pulse_update_7 = fixed_this_hour + td(hours=2, seconds=10)
1150+
tst_consumption.update_pulse_counter(321, 0, pulse_update_7)
11511151
assert not tst_consumption.log_rollover
11521152
assert tst_consumption.collected_pulses(
11531153
fixed_this_hour, is_consumption=True
1154-
) == (2222 + 3333 + 321, pulse_update_6)
1154+
) == (2222 + 3333 + 476, pulse_update_7) # pulses = 476 = 300 + (312 - 146)
11551155

11561156
@freeze_time(dt.now())
11571157
def test_pulse_collection_consumption_empty(

0 commit comments

Comments
 (0)