1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
from typing import Optional
from idasen import IdasenDesk
from tests.test_idasen import MockBleakClient
import asyncio
import pytest
@pytest.fixture(autouse=True)
def add_desk(doctest_namespace: dict):
class DoctestDesk(IdasenDesk):
def __init__(self, mac: str):
super().__init__(mac=mac)
self._client = MockBleakClient()
@staticmethod
async def discover() -> Optional[str]:
return "AA:AA:AA:AA:AA:AA"
doctest_namespace["IdasenDesk"] = DoctestDesk
doctest_namespace["asyncio"] = asyncio
|