Assign unique ports for history and logbook tests

This commit is contained in:
Paulus Schoutsen 2015-04-30 21:59:24 -07:00
parent 2cad421de9
commit 29e376a66e
2 changed files with 8 additions and 2 deletions

View File

@ -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):

View File

@ -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()