mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +00:00
parent
a9785f1b41
commit
62c55e6698
17
tests/components/atag/conftest.py
Normal file
17
tests/components/atag/conftest.py
Normal file
@ -0,0 +1,17 @@
|
||||
"""Provide common Atag fixtures."""
|
||||
import asyncio
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
async def mock_pyatag_sleep():
|
||||
"""Mock out pyatag sleeps."""
|
||||
asyncio_sleep = asyncio.sleep
|
||||
|
||||
async def sleep(duration, loop=None):
|
||||
await asyncio_sleep(0)
|
||||
|
||||
with patch("pyatag.gateway.asyncio.sleep", new=sleep):
|
||||
yield
|
Loading…
x
Reference in New Issue
Block a user