Split bootstrap into bs + setup (#6416)
* Split bootstrap into bs + setup * Lint
This commit is contained in:
parent
bdf948d866
commit
2650c73a89
171 changed files with 972 additions and 959 deletions
|
@ -2,7 +2,7 @@
|
|||
import asyncio
|
||||
import requests
|
||||
|
||||
from homeassistant import bootstrap, const
|
||||
from homeassistant import setup, const
|
||||
import homeassistant.components.http as http
|
||||
|
||||
from tests.common import get_test_instance_port, get_test_home_assistant
|
||||
|
@ -32,7 +32,7 @@ def setUpModule():
|
|||
|
||||
hass = get_test_home_assistant()
|
||||
|
||||
bootstrap.setup_component(
|
||||
setup.setup_component(
|
||||
hass, http.DOMAIN, {
|
||||
http.DOMAIN: {
|
||||
http.CONF_API_PASSWORD: API_PASSWORD,
|
||||
|
@ -42,7 +42,7 @@ def setUpModule():
|
|||
}
|
||||
)
|
||||
|
||||
bootstrap.setup_component(hass, 'api')
|
||||
setup.setup_component(hass, 'api')
|
||||
|
||||
# Registering static path as it caused CORS to blow up
|
||||
hass.http.register_static_path(
|
||||
|
@ -131,7 +131,7 @@ class TestView(http.HomeAssistantView):
|
|||
@asyncio.coroutine
|
||||
def test_registering_view_while_running(hass, test_client):
|
||||
"""Test that we can register a view while the server is running."""
|
||||
yield from bootstrap.async_setup_component(
|
||||
yield from setup.async_setup_component(
|
||||
hass, http.DOMAIN, {
|
||||
http.DOMAIN: {
|
||||
http.CONF_SERVER_PORT: get_test_instance_port(),
|
||||
|
@ -139,7 +139,7 @@ def test_registering_view_while_running(hass, test_client):
|
|||
}
|
||||
)
|
||||
|
||||
yield from bootstrap.async_setup_component(hass, 'api')
|
||||
yield from setup.async_setup_component(hass, 'api')
|
||||
|
||||
yield from hass.async_start()
|
||||
|
||||
|
@ -159,7 +159,7 @@ def test_registering_view_while_running(hass, test_client):
|
|||
@asyncio.coroutine
|
||||
def test_api_base_url_with_domain(hass):
|
||||
"""Test setting api url."""
|
||||
result = yield from bootstrap.async_setup_component(hass, 'http', {
|
||||
result = yield from setup.async_setup_component(hass, 'http', {
|
||||
'http': {
|
||||
'base_url': 'example.com'
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ def test_api_base_url_with_domain(hass):
|
|||
@asyncio.coroutine
|
||||
def test_api_base_url_with_ip(hass):
|
||||
"""Test setting api url."""
|
||||
result = yield from bootstrap.async_setup_component(hass, 'http', {
|
||||
result = yield from setup.async_setup_component(hass, 'http', {
|
||||
'http': {
|
||||
'server_host': '1.1.1.1'
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ def test_api_base_url_with_ip(hass):
|
|||
@asyncio.coroutine
|
||||
def test_api_base_url_with_ip_port(hass):
|
||||
"""Test setting api url."""
|
||||
result = yield from bootstrap.async_setup_component(hass, 'http', {
|
||||
result = yield from setup.async_setup_component(hass, 'http', {
|
||||
'http': {
|
||||
'base_url': '1.1.1.1:8124'
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ def test_api_base_url_with_ip_port(hass):
|
|||
@asyncio.coroutine
|
||||
def test_api_no_base_url(hass):
|
||||
"""Test setting api url."""
|
||||
result = yield from bootstrap.async_setup_component(hass, 'http', {
|
||||
result = yield from setup.async_setup_component(hass, 'http', {
|
||||
'http': {
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue