mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 02:19:31 +00:00
Merge multiple context managers in tests (#48146)
This commit is contained in:
@@ -1221,12 +1221,11 @@ async def test_init_custom_integration(hass):
|
||||
None,
|
||||
{"name": "Hue", "dependencies": [], "requirements": [], "domain": "hue"},
|
||||
)
|
||||
with pytest.raises(data_entry_flow.UnknownHandler):
|
||||
with patch(
|
||||
"homeassistant.loader.async_get_integration",
|
||||
return_value=integration,
|
||||
):
|
||||
await hass.config_entries.flow.async_init("bla")
|
||||
with pytest.raises(data_entry_flow.UnknownHandler), patch(
|
||||
"homeassistant.loader.async_get_integration",
|
||||
return_value=integration,
|
||||
):
|
||||
await hass.config_entries.flow.async_init("bla")
|
||||
|
||||
|
||||
async def test_support_entry_unload(hass):
|
||||
|
||||
Reference in New Issue
Block a user