Use a future for mock coro (#34989)

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

No files matched your search

@@ -14,7 +14,7 @@ from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.setup import async_setup_component
from homeassistant.util import utcnow
from tests.common import MockDependency, async_fire_time_changed
from tests.common import async_fire_time_changed
VALID_CONFIG_MINIMAL = {
"sensor": {
@@ -110,15 +110,8 @@ class ProfileMock:
return self.__class__.summary_data
@pytest.fixture(autouse=True, name="mock_py17track")
def fixture_mock_py17track():
"""Mock py17track dependency."""
with MockDependency("py17track"):
yield
@pytest.fixture(autouse=True, name="mock_client")
def fixture_mock_client(mock_py17track):
def fixture_mock_client():
"""Mock py17track client."""
with mock.patch(
"homeassistant.components.seventeentrack.sensor.SeventeenTrackClient",