hass-core/tests/components/default_config/test_init.py
Ville Skyttä dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00

34 lines
862 B
Python

"""Test the default_config init."""
from unittest.mock import patch
import pytest
from homeassistant.setup import async_setup_component
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
@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
@pytest.fixture(autouse=True)
def recorder_url_mock():
"""Mock recorder url."""
with patch("homeassistant.components.recorder.DEFAULT_URL", "sqlite://"):
yield
async def test_setup(hass, mock_zeroconf):
"""Test setup."""
assert await async_setup_component(hass, "default_config", {"foo": "bar"})