1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Use async_create_task (#15633)

* Use async_create_task

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

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