This commit is contained in:
Paulus Schoutsen committed 2019-07-31 12:25:30 -07:00
1 parent da05dfe708
commit 4de97abc3a
2676 files changed
+163166 -140084

No files matched your search

+7 -6
View File
@@ -11,26 +11,27 @@ from tests.common import MockDependency, mock_coro
@pytest.fixture(autouse=True)
def zeroconf_mock():
"""Mock zeroconf."""
with MockDependency('zeroconf') as mocked_zeroconf:
mocked_zeroconf.Zeroconf.return_value.register_service \
.return_value = mock_coro(True)
with MockDependency("zeroconf") as mocked_zeroconf:
mocked_zeroconf.Zeroconf.return_value.register_service.return_value = mock_coro(
True
)
yield
@pytest.fixture(autouse=True)
def netdisco_mock():
"""Mock netdisco."""
with MockDependency('netdisco', 'discovery'):
with MockDependency("netdisco", "discovery"):
yield
@pytest.fixture(autouse=True)
def recorder_url_mock():
"""Mock recorder url."""
with patch('homeassistant.components.recorder.DEFAULT_URL', 'sqlite://'):
with patch("homeassistant.components.recorder.DEFAULT_URL", "sqlite://"):
yield
async def test_setup(hass):
"""Test setup."""
assert await async_setup_component(hass, 'default_config', {})
assert await async_setup_component(hass, "default_config", {})