File: test_identify.py

package info (click to toggle)
python-elgato 5.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 516 kB
  • sloc: python: 1,288; makefile: 8; sh: 5
file content (24 lines) | stat: -rw-r--r-- 644 bytes parent folder | download
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()