parent
a9785f1b41
commit
62c55e6698
1 changed files with 17 additions and 0 deletions
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…
Add table
Reference in a new issue