Fix coroutine never awaited warning in test (#20892)
This commit is contained in:
parent
987b5cd905
commit
8137b0bb9e
1 changed files with 6 additions and 6 deletions
|
@ -58,9 +58,9 @@ def test_async_add_job_schedule_partial_callback():
|
|||
assert len(hass.add_job.mock_calls) == 0
|
||||
|
||||
|
||||
def test_async_add_job_schedule_coroutinefunction():
|
||||
def test_async_add_job_schedule_coroutinefunction(loop):
|
||||
"""Test that we schedule coroutines and add jobs to the job pool."""
|
||||
hass = MagicMock()
|
||||
hass = MagicMock(loop=MagicMock(wraps=loop))
|
||||
|
||||
async def job():
|
||||
pass
|
||||
|
@ -71,9 +71,9 @@ def test_async_add_job_schedule_coroutinefunction():
|
|||
assert len(hass.add_job.mock_calls) == 0
|
||||
|
||||
|
||||
def test_async_add_job_schedule_partial_coroutinefunction():
|
||||
def test_async_add_job_schedule_partial_coroutinefunction(loop):
|
||||
"""Test that we schedule partial coros and add jobs to the job pool."""
|
||||
hass = MagicMock()
|
||||
hass = MagicMock(loop=MagicMock(wraps=loop))
|
||||
|
||||
async def job():
|
||||
pass
|
||||
|
@ -98,9 +98,9 @@ def test_async_add_job_add_threaded_job_to_pool():
|
|||
assert len(hass.loop.run_in_executor.mock_calls) == 1
|
||||
|
||||
|
||||
def test_async_create_task_schedule_coroutine():
|
||||
def test_async_create_task_schedule_coroutine(loop):
|
||||
"""Test that we schedule coroutines and add jobs to the job pool."""
|
||||
hass = MagicMock()
|
||||
hass = MagicMock(loop=MagicMock(wraps=loop))
|
||||
|
||||
async def job():
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue