Merge multiple context managers in tests (#48146)

This commit is contained in:
Franck Nijhof 2021-03-27 09:17:15 +01:00 committed by GitHub
parent 79af18a8ab
commit ad13a9295e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 590 additions and 627 deletions

View file

@ -377,9 +377,8 @@ async def test_get_cloud_url(hass: HomeAssistant):
hass.components.cloud,
"async_remote_ui_url",
side_effect=cloud.CloudNotAvailable,
):
with pytest.raises(NoURLAvailableError):
_get_cloud_url(hass)
), pytest.raises(NoURLAvailableError):
_get_cloud_url(hass)
async def test_get_external_url_cloud_fallback(hass: HomeAssistant):