Remove YAML support from myq (#45375)

This commit is contained in:
J. Nick Koston
2021-01-21 09:27:04 +01:00
committed by GitHub
parent daa9449f18
commit bb1224d06f
3 changed files with 1 additions and 73 deletions
-30
View File
@@ -44,36 +44,6 @@ async def test_form_user(hass):
assert len(mock_setup_entry.mock_calls) == 1
async def test_import(hass):
"""Test we can import."""
await setup.async_setup_component(hass, "persistent_notification", {})
with patch(
"homeassistant.components.myq.config_flow.pymyq.login",
return_value=True,
), patch(
"homeassistant.components.myq.async_setup", return_value=True
) as mock_setup, patch(
"homeassistant.components.myq.async_setup_entry",
return_value=True,
) as mock_setup_entry:
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_IMPORT},
data={"username": "test-username", "password": "test-password"},
)
await hass.async_block_till_done()
assert result["type"] == "create_entry"
assert result["title"] == "test-username"
assert result["data"] == {
"username": "test-username",
"password": "test-password",
}
assert len(mock_setup.mock_calls) == 1
assert len(mock_setup_entry.mock_calls) == 1
async def test_form_invalid_auth(hass):
"""Test we handle invalid auth."""
result = await hass.config_entries.flow.async_init(