Fix network tests to use get_test_instance_port
This commit is contained in:
parent
74989f7941
commit
df361dc1e1
3 changed files with 21 additions and 3 deletions
|
@ -7,10 +7,12 @@ import pytest
|
|||
from homeassistant.bootstrap import setup_component
|
||||
from homeassistant.const import ATTR_ENTITY_PICTURE
|
||||
import homeassistant.components.camera as camera
|
||||
import homeassistant.components.http as http
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.util.async import run_coroutine_threadsafe
|
||||
|
||||
from tests.common import get_test_home_assistant, assert_setup_component
|
||||
from tests.common import (
|
||||
get_test_home_assistant, get_test_instance_port, assert_setup_component)
|
||||
|
||||
|
||||
class TestSetupCamera(object):
|
||||
|
@ -43,6 +45,10 @@ class TestGetImage(object):
|
|||
"""Setup things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
|
||||
setup_component(
|
||||
self.hass, http.DOMAIN,
|
||||
{http.DOMAIN: {http.CONF_SERVER_PORT: get_test_instance_port()}})
|
||||
|
||||
config = {
|
||||
camera.DOMAIN: {
|
||||
'platform': 'demo'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue