Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Konnected test coverage #16

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
tested part of get request handling
sekyHC committed Oct 7, 2022
commit 4cfd07e59d0d2e25d0ff197c7e231e8551a01654
5 changes: 5 additions & 0 deletions tests/components/konnected/test_init.py
Original file line number Diff line number Diff line change
@@ -477,7 +477,12 @@ async def test_api(hass, hass_client_no_auth, mock_panel):
assert resp.status == HTTPStatus.NOT_FOUND # no device provided

resp = await client.get("/api/konnected/223344556677")
assert resp.status == HTTPStatus.NOT_FOUND # no device part provided

resp = await client.get("/api/konnected/device/223344556677")
assert resp.status == HTTPStatus.NOT_FOUND # unknown device provided
result = await resp.json()
assert result == {"message": "Device 223344556677 not configured"}

resp = await client.get("/api/konnected/device/112233445566")
assert resp.status == HTTPStatus.NOT_FOUND # no zone provided