diff --git a/tests/components/ozw/test_init.py b/tests/components/ozw/test_init.py index c76bfd4a3a0..2e57c4c01f3 100644 --- a/tests/components/ozw/test_init.py +++ b/tests/components/ozw/test_init.py @@ -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