diff --git a/tests/components/camera/test_init.py b/tests/components/camera/test_init.py index 89a19d0458..4bd13c35ad 100644 --- a/tests/components/camera/test_init.py +++ b/tests/components/camera/test_init.py @@ -147,8 +147,7 @@ class TestGetImage: ).result() -@asyncio.coroutine -def test_snapshot_service(hass, mock_camera): +async def test_snapshot_service(hass, mock_camera): """Test snapshot service.""" mopen = mock_open() @@ -156,7 +155,7 @@ def test_snapshot_service(hass, mock_camera): "homeassistant.components.camera.open", mopen, create=True ), patch.object(hass.config, "is_allowed_path", return_value=True): common.async_snapshot(hass, "/tmp/bla") - yield from hass.async_block_till_done() + await hass.async_block_till_done() mock_write = mopen().write