Get rid of mock http component app (#7775)
* Remove mock_http_component from config tests * Remove mock_http_component_app from emulated hue test
This commit is contained in:
1 parent
65c3201fa6
commit
81aaeaaf11
5 files changed
+26
-81
No files matched your search
@@ -4,22 +4,18 @@ from unittest.mock import patch
|
||||
|
||||
from homeassistant.bootstrap import async_setup_component
|
||||
from homeassistant.components import config
|
||||
from homeassistant.components.config.core import CheckConfigView
|
||||
from tests.common import mock_http_component_app, mock_coro
|
||||
from tests.common import mock_coro
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def test_validate_config_ok(hass, test_client):
|
||||
"""Test checking config."""
|
||||
app = mock_http_component_app(hass)
|
||||
with patch.object(config, 'SECTIONS', ['core']):
|
||||
yield from async_setup_component(hass, 'config', {})
|
||||
|
||||
# yield from hass.async_block_till_done()
|
||||
yield from asyncio.sleep(0.1, loop=hass.loop)
|
||||
|
||||
hass.http.views[CheckConfigView.name].register(app.router)
|
||||
client = yield from test_client(app)
|
||||
client = yield from test_client(hass.http.app)
|
||||
|
||||
with patch(
|
||||
'homeassistant.components.config.core.async_check_ha_config_file',
|
||||
|
||||
Reference in new issue
Block a user