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