mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +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
|
||||
|
||||
SERVER_PORT = 8126
|
||||
|
||||
|
||||
class TestComponentHistory(unittest.TestCase):
|
||||
""" Tests homeassistant.components.history module. """
|
||||
@ -40,7 +42,8 @@ class TestComponentHistory(unittest.TestCase):
|
||||
|
||||
def test_setup(self):
|
||||
""" 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, {}))
|
||||
|
||||
def test_last_5_states(self):
|
||||
|
@ -16,6 +16,8 @@ from homeassistant.components import logbook, http
|
||||
|
||||
from helpers import get_test_home_assistant
|
||||
|
||||
SERVER_PORT = 8127
|
||||
|
||||
|
||||
class TestComponentHistory(unittest.TestCase):
|
||||
""" Tests homeassistant.components.history module. """
|
||||
@ -24,7 +26,8 @@ class TestComponentHistory(unittest.TestCase):
|
||||
""" Test setup method. """
|
||||
try:
|
||||
hass = get_test_home_assistant()
|
||||
http.setup(hass, {})
|
||||
http.setup(hass, {
|
||||
http.DOMAIN: {http.CONF_SERVER_PORT: SERVER_PORT}})
|
||||
self.assertTrue(logbook.setup(hass, {}))
|
||||
finally:
|
||||
hass.stop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user