2019-02-07 20:07:15 -08:00
|
|
|
"""Test the default_config init."""
|
2021-01-01 22:31:56 +01:00
|
|
|
from unittest.mock import patch
|
|
|
|
|
2019-02-07 20:07:15 -08:00
|
|
|
import pytest
|
|
|
|
|
2019-12-09 17:42:00 +01:00
|
|
|
from homeassistant.setup import async_setup_component
|
|
|
|
|
2020-11-25 15:10:04 +01:00
|
|
|
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
|
2020-05-03 11:27:19 -07:00
|
|
|
|
2019-02-07 20:07:15 -08:00
|
|
|
|
2020-07-17 15:17:40 -10:00
|
|
|
@pytest.fixture(autouse=True)
|
|
|
|
def mock_ssdp():
|
|
|
|
"""Mock ssdp."""
|
|
|
|
with patch("homeassistant.components.ssdp.Scanner.async_scan"):
|
|
|
|
yield
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
|
|
def mock_updater():
|
|
|
|
"""Mock updater."""
|
|
|
|
with patch("homeassistant.components.updater.get_newest_version"):
|
|
|
|
yield
|
|
|
|
|
|
|
|
|
2019-02-07 20:07:15 -08:00
|
|
|
@pytest.fixture(autouse=True)
|
|
|
|
def recorder_url_mock():
|
|
|
|
"""Mock recorder url."""
|
2019-07-31 12:25:30 -07:00
|
|
|
with patch("homeassistant.components.recorder.DEFAULT_URL", "sqlite://"):
|
2019-02-07 20:07:15 -08:00
|
|
|
yield
|
|
|
|
|
|
|
|
|
2020-09-13 18:06:19 -05:00
|
|
|
async def test_setup(hass, mock_zeroconf):
|
2019-02-07 20:07:15 -08:00
|
|
|
"""Test setup."""
|
2020-04-06 14:36:49 +03:00
|
|
|
assert await async_setup_component(hass, "default_config", {"foo": "bar"})
|