1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
"""Tests for identifying the Elgato Light device."""
from aiohttp import ClientSession
from aresponses import ResponsesMockServer
from elgato import Elgato
async def test_identify(aresponses: ResponsesMockServer) -> None:
"""Test identifying the Elgato Light."""
aresponses.add(
"example.com:9123",
"/elgato/identify",
"POST",
aresponses.Response(
status=200,
headers={"Content-Type": "application/json"},
text="",
),
)
async with ClientSession() as session:
elgato = Elgato("example.com", session=session)
await elgato.identify()
|