Change pending task sheduler to time based cleanup (#4324)

* Change pending task sheduler to time based cleanup

* update unittest
This commit is contained in:
Pascal Vizeli 2016-11-09 17:41:17 +01:00 committed by Paulus Schoutsen
parent 04dbc992ec
commit 71da21dcc8
4 changed files with 42 additions and 19 deletions

View file

@ -102,7 +102,8 @@ def async_test_home_assistant(loop):
@asyncio.coroutine
def mock_async_start():
with patch.object(loop, 'add_signal_handler'), \
patch('homeassistant.core._async_create_timer'):
patch('homeassistant.core._async_create_timer'), \
patch.object(hass, '_async_tasks_cleanup', return_value=None):
yield from orig_start()
hass.async_start = mock_async_start