1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Fix block till done in create entry config flow tests (#42290)

This commit is contained in:
Paulus Schoutsen
2020-10-24 16:20:56 +02:00
committed by GitHub
parent bfb603fe78
commit 1c36bf5e19
57 changed files with 105 additions and 108 deletions

View File

@@ -28,6 +28,7 @@ async def test_form(hass):
result["flow_id"],
{CONF_EMAIL: "mock@example.com", CONF_PASSWORD: "test-password"},
)
await hass.async_block_till_done()
assert result2["type"] == "create_entry"
assert result2["title"] == "mock@example.com"
@@ -35,7 +36,6 @@ async def test_form(hass):
CONF_EMAIL: "mock@example.com",
CONF_PASSWORD: "test-password",
}
await hass.async_block_till_done()
assert len(mock_setup.mock_calls) == 1
assert len(mock_setup_entry.mock_calls) == 1
@@ -115,6 +115,7 @@ async def test_import(hass):
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_IMPORT}, data=imported_conf
)
await hass.async_block_till_done()
assert result["type"] == "create_entry"
assert result["title"] == "mock@example.com"
@@ -122,6 +123,5 @@ async def test_import(hass):
CONF_EMAIL: "mock@example.com",
CONF_PASSWORD: "test-password",
}
await hass.async_block_till_done()
assert len(mock_setup.mock_calls) == 1
assert len(mock_setup_entry.mock_calls) == 1