Fix block till done in create entry config flow tests (#42290)
This commit is contained in:
parent
bfb603fe78
commit
1c36bf5e19
57 changed files with 105 additions and 108 deletions
|
@ -47,6 +47,7 @@ async def test_user(hass, tuya):
|
|||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input=TUYA_USER_DATA
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
assert result["title"] == USERNAME
|
||||
|
@ -56,7 +57,6 @@ async def test_user(hass, tuya):
|
|||
assert result["data"][CONF_PLATFORM] == TUYA_PLATFORM
|
||||
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
|
||||
|
||||
|
@ -76,6 +76,7 @@ async def test_import(hass, tuya):
|
|||
context={"source": config_entries.SOURCE_IMPORT},
|
||||
data=TUYA_USER_DATA,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
assert result["title"] == USERNAME
|
||||
|
@ -85,7 +86,6 @@ async def test_import(hass, tuya):
|
|||
assert result["data"][CONF_PLATFORM] == TUYA_PLATFORM
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue