mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
Fix ozw init tests (#45718)
This commit is contained in:
parent
df00f32dfc
commit
ace5b58337
@ -53,6 +53,7 @@ async def test_publish_without_mqtt(hass, caplog):
|
||||
|
||||
# Sending a message should not error with the MQTT integration not set up.
|
||||
send_message("test_topic", "test_payload")
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert "MQTT integration is not set up" in caplog.text
|
||||
|
||||
@ -127,8 +128,8 @@ async def test_remove_entry(hass, stop_addon, uninstall_addon, caplog):
|
||||
|
||||
await hass.config_entries.async_remove(entry.entry_id)
|
||||
|
||||
stop_addon.call_count == 1
|
||||
uninstall_addon.call_count == 1
|
||||
assert stop_addon.call_count == 1
|
||||
assert uninstall_addon.call_count == 1
|
||||
assert entry.state == config_entries.ENTRY_STATE_NOT_LOADED
|
||||
assert len(hass.config_entries.async_entries(DOMAIN)) == 0
|
||||
stop_addon.reset_mock()
|
||||
@ -141,8 +142,8 @@ async def test_remove_entry(hass, stop_addon, uninstall_addon, caplog):
|
||||
|
||||
await hass.config_entries.async_remove(entry.entry_id)
|
||||
|
||||
stop_addon.call_count == 1
|
||||
uninstall_addon.call_count == 0
|
||||
assert stop_addon.call_count == 1
|
||||
assert uninstall_addon.call_count == 0
|
||||
assert entry.state == config_entries.ENTRY_STATE_NOT_LOADED
|
||||
assert len(hass.config_entries.async_entries(DOMAIN)) == 0
|
||||
assert "Failed to stop the OpenZWave add-on" in caplog.text
|
||||
@ -157,8 +158,8 @@ async def test_remove_entry(hass, stop_addon, uninstall_addon, caplog):
|
||||
|
||||
await hass.config_entries.async_remove(entry.entry_id)
|
||||
|
||||
stop_addon.call_count == 1
|
||||
uninstall_addon.call_count == 1
|
||||
assert stop_addon.call_count == 1
|
||||
assert uninstall_addon.call_count == 1
|
||||
assert entry.state == config_entries.ENTRY_STATE_NOT_LOADED
|
||||
assert len(hass.config_entries.async_entries(DOMAIN)) == 0
|
||||
assert "Failed to uninstall the OpenZWave add-on" in caplog.text
|
||||
|
Loading…
x
Reference in New Issue
Block a user