mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-11-04 15:39:42 +08:00
add test for restarting camera
This commit is contained in:
parent
adebd86485
commit
52e612d898
@ -173,3 +173,27 @@ async def test_restart_camera(device_url, payload, response):
|
||||
|
||||
m.assert_called_once()
|
||||
assert await result.json() == response
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize(
|
||||
"payload",
|
||||
[
|
||||
{
|
||||
"msg": "rebooting device"
|
||||
}
|
||||
],
|
||||
)
|
||||
async def test_restart_camera(device_url, payload):
|
||||
with aioresponses() as m:
|
||||
m.get(
|
||||
rf"{device_url}/control/builtin/command/rebootDevice/",
|
||||
status=200,
|
||||
payload=payload,
|
||||
)
|
||||
|
||||
async with OpenIrisClient(device_url) as openiris_client:
|
||||
result = await openiris_client.reboot_device()
|
||||
|
||||
m.assert_called_once()
|
||||
assert await result.json() == payload
|
||||
Loading…
Reference in New Issue
Block a user