mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Fix network tests to use get_test_instance_port
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user