Migrate camera tests from coroutine to async/await (#30372)
This commit is contained in:
parent
8814e1eadc
commit
c837f185f7
1 changed files with 2 additions and 3 deletions
|
@ -147,8 +147,7 @@ class TestGetImage:
|
||||||
).result()
|
).result()
|
||||||
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
async def test_snapshot_service(hass, mock_camera):
|
||||||
def test_snapshot_service(hass, mock_camera):
|
|
||||||
"""Test snapshot service."""
|
"""Test snapshot service."""
|
||||||
mopen = mock_open()
|
mopen = mock_open()
|
||||||
|
|
||||||
|
@ -156,7 +155,7 @@ def test_snapshot_service(hass, mock_camera):
|
||||||
"homeassistant.components.camera.open", mopen, create=True
|
"homeassistant.components.camera.open", mopen, create=True
|
||||||
), patch.object(hass.config, "is_allowed_path", return_value=True):
|
), patch.object(hass.config, "is_allowed_path", return_value=True):
|
||||||
common.async_snapshot(hass, "/tmp/bla")
|
common.async_snapshot(hass, "/tmp/bla")
|
||||||
yield from hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
mock_write = mopen().write
|
mock_write = mopen().write
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue