@@ -1119,16 +1119,18 @@ def test_pulse_collection_consumption(
11191119 assert tst_consumption .collected_pulses (
11201120 test_timestamp , is_consumption = True
11211121 ) == (55 , pulse_update_3 )
1122- pulse_update_4 = fixed_this_hour + td (hours = 1 , seconds = 18 )
1122+ pulse_update_4 = fixed_this_hour + td (hours = 1 , seconds = 18 )
11231123 tst_consumption .update_pulse_counter (2500 , 0 , pulse_update_4 )
11241124 assert tst_consumption .collected_pulses (
11251125 test_timestamp , is_consumption = True
11261126 ) == (155 , pulse_update_4 )
1127+ pulse_update_5 = fixed_this_hour + td (hours = 1 , seconds = 33 )
1128+ tst_consumption .update_pulse_counter (45 , 0 , pulse_update_5 )
11271129 tst_consumption .add_log (100 , 2 , (fixed_this_hour + td (hours = 1 )), 2222 )
11281130 assert not tst_consumption .log_rollover
11291131 assert tst_consumption .collected_pulses (
11301132 test_timestamp , is_consumption = True
1131- ) == (45 , pulse_update_3 )
1133+ ) == (45 , pulse_update_5 )
11321134 assert tst_consumption .collected_pulses (
11331135 fixed_this_hour , is_consumption = True
11341136 ) == (45 + 2222 , pulse_update_3 )
@@ -1139,12 +1141,12 @@ def test_pulse_collection_consumption(
11391141 assert tst_consumption .collected_pulses (
11401142 fixed_this_hour , is_consumption = True
11411143 ) == (45 + 2222 + 3333 , pulse_update_3 )
1142- pulse_update_4 = fixed_this_hour + td (hours = 2 , seconds = 10 )
1143- tst_consumption .update_pulse_counter (321 , 0 , pulse_update_4 )
1144+ pulse_update_6 = fixed_this_hour + td (hours = 2 , seconds = 10 )
1145+ tst_consumption .update_pulse_counter (321 , 0 , pulse_update_6 )
11441146 assert not tst_consumption .log_rollover
11451147 assert tst_consumption .collected_pulses (
11461148 fixed_this_hour , is_consumption = True
1147- ) == (2222 + 3333 + 321 , pulse_update_4 )
1149+ ) == (2222 + 3333 + 321 , pulse_update_6 )
11481150
11491151 @freeze_time (dt .now ())
11501152 def test_pulse_collection_consumption_empty (
0 commit comments