mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Merge pull request #3706 from home-assistant/hotfix-0-29-7b
Fix broken unit tests
This commit is contained in:
commit
9d085a023c
@ -192,8 +192,6 @@ class HomeAssistant(object):
|
||||
except KeyboardInterrupt:
|
||||
self.loop.call_soon(stop_homeassistant)
|
||||
self.loop.run_forever()
|
||||
finally:
|
||||
self.loop.close()
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_start(self):
|
||||
|
@ -78,8 +78,9 @@ def get_test_home_assistant(num_threads=None):
|
||||
with patch.object(ha, 'async_create_timer', return_value=None):
|
||||
with patch.object(ha, 'async_monitor_worker_pool',
|
||||
return_value=None):
|
||||
orig_start()
|
||||
hass.block_till_done()
|
||||
with patch.object(hass.loop, 'add_signal_handler'):
|
||||
orig_start()
|
||||
hass.block_till_done()
|
||||
|
||||
def stop_hass():
|
||||
orig_stop()
|
||||
|
@ -1,8 +1,6 @@
|
||||
"""Test to verify that Home Assistant core works."""
|
||||
# pylint: disable=protected-access,too-many-public-methods
|
||||
# pylint: disable=too-few-public-methods
|
||||
import os
|
||||
import signal
|
||||
import unittest
|
||||
from unittest.mock import patch, MagicMock
|
||||
from datetime import datetime, timedelta
|
||||
@ -14,8 +12,7 @@ from homeassistant.exceptions import InvalidEntityFormatError
|
||||
import homeassistant.util.dt as dt_util
|
||||
from homeassistant.util.unit_system import (METRIC_SYSTEM)
|
||||
from homeassistant.const import (
|
||||
__version__, EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP,
|
||||
EVENT_STATE_CHANGED, ATTR_FRIENDLY_NAME, CONF_UNIT_SYSTEM)
|
||||
__version__, EVENT_STATE_CHANGED, ATTR_FRIENDLY_NAME, CONF_UNIT_SYSTEM)
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user