hass-core/tests/components/default_config/test_init.py
Paulus Schoutsen aaa1d06809
Directly call async_write_ha_state (#33508)
* Directly call async_write_ha_state

* Address comments

* Fix tests
2020-04-01 14:19:51 -07:00

18 lines
435 B
Python

"""Test the default_config init."""
from unittest.mock import patch
import pytest
from homeassistant.setup import async_setup_component
@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", {})