Skip to content

Commit

Permalink
Pass kwargs to orig_async_create_task in test (#3529)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Feb 28, 2024
1 parent 7d46a52 commit a422090
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ def async_add_executor_job(target, *args):

return orig_async_add_executor_job(target, *args)

def async_create_task(coroutine, *args):
def async_create_task(coroutine, *args, **kwargs):
"""Create task."""
if isinstance(coroutine, Mock) and not isinstance(coroutine, AsyncMock):
fut = asyncio.Future()
fut.set_result(None)
return fut

return orig_async_create_task(coroutine, *args)
return orig_async_create_task(coroutine, *args, **kwargs)

hass.async_add_job = async_add_job
hass.async_add_executor_job = async_add_executor_job
Expand Down

0 comments on commit a422090

Please sign in to comment.