Skip to content

Commit 8580805

Browse files
committed
Adapt test
1 parent 95879c7 commit 8580805

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_usb.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,12 +1113,17 @@ def test_pulse_collection_consumption(
11131113
# Test rollover by updating pulses before log record
11141114
assert not tst_consumption.log_rollover
11151115
pulse_update_3 = fixed_this_hour + td(hours=1, seconds=3)
1116-
tst_consumption.update_pulse_counter(45, 0, pulse_update_3)
1116+
tst_consumption.update_pulse_counter(2400, 0, pulse_update_3)
11171117
assert tst_consumption.log_rollover
11181118
test_timestamp = fixed_this_hour + td(hours=1, seconds=5)
11191119
assert tst_consumption.collected_pulses(
11201120
test_timestamp, is_consumption=True
1121-
) == (45, pulse_update_3)
1121+
) == (55, pulse_update_3)
1122+
pulse_update_4= fixed_this_hour + td(hours=1, seconds=18)
1123+
tst_consumption.update_pulse_counter(2500, 0, pulse_update_4)
1124+
assert tst_consumption.collected_pulses(
1125+
test_timestamp, is_consumption=True
1126+
) == (155, pulse_update_4)
11221127
tst_consumption.add_log(100, 2, (fixed_this_hour + td(hours=1)), 2222)
11231128
assert not tst_consumption.log_rollover
11241129
assert tst_consumption.collected_pulses(

0 commit comments

Comments
 (0)