mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Assign unique ports for history and logbook tests
This commit is contained in:
parent
2cad421de9
commit
29e376a66e
@ -15,6 +15,8 @@ from homeassistant.components import history, recorder, http
|
|||||||
|
|
||||||
from helpers import get_test_home_assistant, mock_state_change_event
|
from helpers import get_test_home_assistant, mock_state_change_event
|
||||||
|
|
||||||
|
SERVER_PORT = 8126
|
||||||
|
|
||||||
|
|
||||||
class TestComponentHistory(unittest.TestCase):
|
class TestComponentHistory(unittest.TestCase):
|
||||||
""" Tests homeassistant.components.history module. """
|
""" Tests homeassistant.components.history module. """
|
||||||
@ -40,7 +42,8 @@ class TestComponentHistory(unittest.TestCase):
|
|||||||
|
|
||||||
def test_setup(self):
|
def test_setup(self):
|
||||||
""" Test setup method of history. """
|
""" Test setup method of history. """
|
||||||
http.setup(self.hass, {http.DOMAIN: {}})
|
http.setup(self.hass, {
|
||||||
|
http.DOMAIN: {http.CONF_SERVER_PORT: SERVER_PORT}})
|
||||||
self.assertTrue(history.setup(self.hass, {}))
|
self.assertTrue(history.setup(self.hass, {}))
|
||||||
|
|
||||||
def test_last_5_states(self):
|
def test_last_5_states(self):
|
||||||
|
@ -16,6 +16,8 @@ from homeassistant.components import logbook, http
|
|||||||
|
|
||||||
from helpers import get_test_home_assistant
|
from helpers import get_test_home_assistant
|
||||||
|
|
||||||
|
SERVER_PORT = 8127
|
||||||
|
|
||||||
|
|
||||||
class TestComponentHistory(unittest.TestCase):
|
class TestComponentHistory(unittest.TestCase):
|
||||||
""" Tests homeassistant.components.history module. """
|
""" Tests homeassistant.components.history module. """
|
||||||
@ -24,7 +26,8 @@ class TestComponentHistory(unittest.TestCase):
|
|||||||
""" Test setup method. """
|
""" Test setup method. """
|
||||||
try:
|
try:
|
||||||
hass = get_test_home_assistant()
|
hass = get_test_home_assistant()
|
||||||
http.setup(hass, {})
|
http.setup(hass, {
|
||||||
|
http.DOMAIN: {http.CONF_SERVER_PORT: SERVER_PORT}})
|
||||||
self.assertTrue(logbook.setup(hass, {}))
|
self.assertTrue(logbook.setup(hass, {}))
|
||||||
finally:
|
finally:
|
||||||
hass.stop()
|
hass.stop()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user