mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Fire events when long term statistics is updated (#82492)
* Fire events when long term statistics is updated * Allow the new events to be subscribed to by anyone * Address review comments * Finish renaming events * Finish renaming events * Fix do_adhoc_statistics * Adjust tests * Adjust tests
This commit is contained in:
@@ -418,14 +418,15 @@ async def test_discovery_requirements_ssdp(hass):
|
||||
) as mock_process:
|
||||
await async_get_integration_with_requirements(hass, "ssdp_comp")
|
||||
|
||||
assert len(mock_process.mock_calls) == 4
|
||||
assert len(mock_process.mock_calls) == 5
|
||||
assert mock_process.mock_calls[0][1][1] == ssdp.requirements
|
||||
# Ensure zeroconf is a dep for ssdp
|
||||
assert {
|
||||
mock_process.mock_calls[1][1][0],
|
||||
mock_process.mock_calls[2][1][0],
|
||||
mock_process.mock_calls[3][1][0],
|
||||
} == {"network", "zeroconf", "http"}
|
||||
mock_process.mock_calls[4][1][0],
|
||||
} == {"http", "network", "recorder", "zeroconf"}
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -447,7 +448,7 @@ async def test_discovery_requirements_zeroconf(hass, partial_manifest):
|
||||
) as mock_process:
|
||||
await async_get_integration_with_requirements(hass, "comp")
|
||||
|
||||
assert len(mock_process.mock_calls) == 3 # zeroconf also depends on http
|
||||
assert len(mock_process.mock_calls) == 4 # zeroconf also depends on http
|
||||
assert mock_process.mock_calls[0][1][1] == zeroconf.requirements
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user