mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-10 03:19:37 +00:00
Use status 404 in more places when appropriate (#5480)
This commit is contained in:
@@ -400,3 +400,22 @@ async def test_api_network_vlan(
|
||||
"id": Variant("u", 1),
|
||||
"parent": Variant("s", "0c23631e-2118-355c-bbb0-8943229cb0d6"),
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("method", "url"),
|
||||
[
|
||||
("get", "/network/interface/bad/info"),
|
||||
("post", "/network/interface/bad/update"),
|
||||
("get", "/network/interface/bad/accesspoints"),
|
||||
("post", "/network/interface/bad/vlan/1"),
|
||||
],
|
||||
)
|
||||
async def test_network_interface_not_found(
|
||||
api_client: TestClient, method: str, url: str
|
||||
):
|
||||
"""Test network interface not found error."""
|
||||
resp = await api_client.request(method, url)
|
||||
assert resp.status == 404
|
||||
body = await resp.json()
|
||||
assert body["message"] == "Interface bad does not exist"
|
||||
|
||||
Reference in New Issue
Block a user