1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use a future for mock coro (#34989)

This commit is contained in:
Paulus Schoutsen
2020-04-30 16:31:00 -07:00
committed by GitHub
parent ba7391528f
commit 76f392476b
26 changed files with 154 additions and 262 deletions

View File

@@ -1,5 +1,4 @@
"""Test for smart home alexa support."""
from unittest.mock import patch
import pytest
@@ -39,7 +38,8 @@ from . import (
reported_properties,
)
from tests.common import async_mock_service, mock_coro
from tests.async_mock import patch
from tests.common import async_mock_service
@pytest.fixture
@@ -3831,7 +3831,7 @@ async def test_initialize_camera_stream(hass, mock_camera, mock_stream):
with patch(
"homeassistant.components.demo.camera.DemoCamera.stream_source",
return_value=mock_coro("rtsp://example.local"),
return_value="rtsp://example.local",
), patch(
"homeassistant.helpers.network.async_get_external_url",
return_value="https://mycamerastream.test",