@@ -1218,15 +1218,15 @@ def test_pulse_collection_production(self, monkeypatch: pytest.MonkeyPatch) -> N
12181218 # Test consumption & production - Log import #1 - production
12191219 # Missing addresses can not be determined yet
12201220 test_timestamp = fixed_this_hour - td (hours = 1 )
1221- tst_production .add_log (200 , 2 , test_timestamp , 2000 )
1221+ tst_production .add_log (200 , 2 , test_timestamp , - 2000 )
12221222 assert tst_production .log_addresses_missing is None
12231223 assert tst_production .production_logging is None
12241224
12251225 # Test consumption & production - Log import #2 - consumption
12261226 # production must be enabled & intervals are unknown
12271227 # Log at address 200 is known and expect production logs too
12281228 test_timestamp = fixed_this_hour - td (hours = 1 )
1229- tst_production .add_log (200 , 1 , test_timestamp , 1000 )
1229+ tst_production .add_log (200 , 1 , test_timestamp , 0 )
12301230 assert tst_production .log_addresses_missing is None
12311231 assert tst_production .log_interval_consumption is None
12321232 assert tst_production .log_interval_production is None
@@ -1235,7 +1235,7 @@ def test_pulse_collection_production(self, monkeypatch: pytest.MonkeyPatch) -> N
12351235 # Test consumption & production - Log import #3 - production
12361236 # Interval of consumption is not yet available
12371237 test_timestamp = fixed_this_hour - td (hours = 2 ) # type: ignore[unreachable]
1238- tst_production .add_log (199 , 4 , test_timestamp , 4000 )
1238+ tst_production .add_log (199 , 4 , test_timestamp , - 2200 )
12391239 missing_check = list (range (199 , 157 , - 1 ))
12401240 assert tst_production .log_addresses_missing == missing_check
12411241 assert tst_production .log_interval_consumption is None
@@ -1245,32 +1245,32 @@ def test_pulse_collection_production(self, monkeypatch: pytest.MonkeyPatch) -> N
12451245 # Test consumption & production - Log import #4
12461246 # Interval of consumption is available
12471247 test_timestamp = fixed_this_hour - td (hours = 2 )
1248- tst_production .add_log (199 , 3 , test_timestamp , 3000 )
1248+ tst_production .add_log (199 , 3 , test_timestamp , 0 )
12491249 assert tst_production .log_addresses_missing == missing_check
12501250 assert tst_production .log_interval_consumption == 60
12511251 assert tst_production .log_interval_production == 60
12521252 assert tst_production .production_logging
12531253
12541254 pulse_update_1 = fixed_this_hour + td (minutes = 5 )
1255- tst_production .update_pulse_counter (100 , 50 , pulse_update_1 )
1255+ tst_production .update_pulse_counter (0 , - 500 , pulse_update_1 )
12561256 assert tst_production .collected_pulses (
12571257 fixed_this_hour , is_consumption = True
1258- ) == (100 , pulse_update_1 )
1258+ ) == (0 , pulse_update_1 )
12591259 assert tst_production .collected_pulses (
12601260 fixed_this_hour , is_consumption = False
1261- ) == (50 , pulse_update_1 )
1261+ ) == (500 , pulse_update_1 )
12621262 assert tst_production .collected_pulses (
12631263 fixed_this_hour - td (hours = 1 ), is_consumption = True
1264- ) == (100 , pulse_update_1 )
1264+ ) == (0 , pulse_update_1 )
12651265 assert tst_production .collected_pulses (
12661266 fixed_this_hour - td (hours = 2 ), is_consumption = True
1267- ) == (1000 + 100 , pulse_update_1 )
1267+ ) == (0 + 0 , pulse_update_1 )
12681268 assert tst_production .collected_pulses (
12691269 fixed_this_hour - td (hours = 1 ), is_consumption = False
1270- ) == (50 , pulse_update_1 )
1270+ ) == (500 , pulse_update_1 )
12711271 assert tst_production .collected_pulses (
12721272 fixed_this_hour - td (hours = 2 ), is_consumption = False
1273- ) == (2000 + 50 , pulse_update_1 )
1273+ ) == (2000 + 500 , pulse_update_1 )
12741274
12751275 _pulse_update = 0
12761276
0 commit comments