Stub http component in tests

This commit is contained in:
Paulus Schoutsen committed 2015-07-11 00:02:52 -07:00
1 parent dea0fcc845
commit eb4bb6925f
4 files changed
+22 -12

No files matched your search

+3 -6
View File
@@ -12,11 +12,9 @@ import homeassistant as ha
from homeassistant.const import (
EVENT_STATE_CHANGED, EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP)
import homeassistant.util.dt as dt_util
from homeassistant.components import logbook, http
from homeassistant.components import logbook
from helpers import get_test_home_assistant
SERVER_PORT = 8127
from helpers import get_test_home_assistant, mock_http_component
class TestComponentHistory(unittest.TestCase):
@@ -26,8 +24,7 @@ class TestComponentHistory(unittest.TestCase):
""" Test setup method. """
try:
hass = get_test_home_assistant()
http.setup(hass, {
http.DOMAIN: {http.CONF_SERVER_PORT: SERVER_PORT}})
mock_http_component(hass)
self.assertTrue(logbook.setup(hass, {}))
finally:
hass.stop()