Use async_create_task (#15633)

* Use async_create_task

* Fix test
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2018-07-23 14:05:38 +02:00
1 parent 50b6c5948d
commit ea2ff6aae3
26 files changed
+50 -49

No files matched your search

+1 -1
View File
@@ -91,7 +91,7 @@ async def test_setup_entry_successful(hass):
"""Test setup entry is successful."""
entry = Mock()
entry.data = {'host': '1.2.3.4', 'port': 80, 'api_key': '1234567890ABCDEF'}
with patch.object(hass, 'async_add_job') as mock_add_job, \
with patch.object(hass, 'async_create_task') as mock_add_job, \
patch.object(hass, 'config_entries') as mock_config_entries, \
patch('pydeconz.DeconzSession.async_load_parameters',
return_value=mock_coro(True)):