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:
@@ -61,6 +61,7 @@ async def test_form(hass, mock_login, mock_get_devices):
|
||||
result["flow_id"],
|
||||
{"username": "test-email@test-domain.com", "password": "test-password"},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert result2["type"] == "create_entry"
|
||||
assert result2["title"] == "test-email@test-domain.com"
|
||||
@@ -68,7 +69,6 @@ async def test_form(hass, mock_login, mock_get_devices):
|
||||
"username": "test-email@test-domain.com",
|
||||
"token": "test-token",
|
||||
}
|
||||
await hass.async_block_till_done()
|
||||
assert len(mock_setup.mock_calls) == 1
|
||||
assert len(mock_setup_entry.mock_calls) == 1
|
||||
|
||||
@@ -128,6 +128,7 @@ async def test_import_with_token(hass, mock_login, mock_get_devices):
|
||||
context={"source": config_entries.SOURCE_IMPORT},
|
||||
data={"username": "test-email@test-domain.com", "token": "test-token"},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert result["type"] == "create_entry"
|
||||
assert result["title"] == "test-email@test-domain.com"
|
||||
@@ -135,7 +136,6 @@ async def test_import_with_token(hass, mock_login, mock_get_devices):
|
||||
"username": "test-email@test-domain.com",
|
||||
"token": "test-token",
|
||||
}
|
||||
await hass.async_block_till_done()
|
||||
assert len(mock_setup.mock_calls) == 1
|
||||
assert len(mock_setup_entry.mock_calls) == 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user