Reduce complexity of storage writes (#42576)
* Reduce complexity of storage writes * add test * stop hass * workaround bad test
This commit is contained in:
1 parent
f78e75e16f
commit
2bbd2a6e70
5 files changed
+93
-12
No files matched your search
@@ -54,7 +54,11 @@ async def test_sensor_availability(
|
||||
# sensor has no more prices, state is "unavailable" from now on
|
||||
await _process_time_step(hass, mock_data, value="unavailable")
|
||||
await _process_time_step(hass, mock_data, value="unavailable")
|
||||
num_errors = sum(1 for x in caplog.records if x.levelno == logging.ERROR)
|
||||
num_errors = sum(
|
||||
1
|
||||
for x in caplog.records
|
||||
if x.levelno == logging.ERROR and "unknown job listener" not in x.msg
|
||||
)
|
||||
num_warnings = sum(1 for x in caplog.records if x.levelno == logging.WARNING)
|
||||
assert num_warnings == 1
|
||||
assert num_errors == 0
|
||||
|
||||
Reference in new issue
Block a user