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

@@ -42,6 +42,7 @@ async def test_user(hass, spider):
result = await hass.config_entries.flow.async_configure(
result["flow_id"], user_input=SPIDER_USER_DATA
)
await hass.async_block_till_done()
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
assert result["title"] == DOMAIN
@@ -49,7 +50,6 @@ async def test_user(hass, spider):
assert result["data"][CONF_PASSWORD] == PASSWORD
assert not result["result"].unique_id
await hass.async_block_till_done()
assert len(mock_setup.mock_calls) == 1
assert len(mock_setup_entry.mock_calls) == 1
@@ -69,6 +69,7 @@ async def test_import(hass, spider):
context={"source": config_entries.SOURCE_IMPORT},
data=SPIDER_USER_DATA,
)
await hass.async_block_till_done()
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
assert result["title"] == DOMAIN
@@ -76,7 +77,6 @@ async def test_import(hass, spider):
assert result["data"][CONF_PASSWORD] == PASSWORD
assert not result["result"].unique_id
await hass.async_block_till_done()
assert len(mock_setup.mock_calls) == 1
assert len(mock_setup_entry.mock_calls) == 1