1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add default_config component (#20799)

* Add default config component

* Add default_config to default config

* Fix comments
This commit is contained in:
Paulus Schoutsen
2019-02-07 20:07:15 -08:00
committed by GitHub
parent 222c4ea6f3
commit e59240fa00
7 changed files with 66 additions and 47 deletions

View File

@@ -0,0 +1,27 @@
"""Test the default_config init."""
from unittest.mock import patch
from homeassistant.setup import async_setup_component
import pytest
from tests.common import MockDependency
@pytest.fixture(autouse=True)
def netdisco_mock():
"""Mock netdisco."""
with MockDependency('netdisco', 'discovery'):
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):
"""Test setup."""
assert await async_setup_component(hass, 'default_config', {})