mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Migrate camera tests from coroutine to async/await (#30372)
This commit is contained in:
parent
8814e1eadc
commit
c837f185f7
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user