forked from HomeLab/unraid-mcp
test: address final 3 CodeRabbit review threads
- http_layer/test_request_construction.py: tighten JSON error match from "invalid response" to "invalid response.*not valid JSON" to prevent false positives - safety/test_destructive_guards.py: add test_docker_update_all_with_confirm to TestConfirmAllowsExecution (was missing positive coverage for update_all) - safety/test_destructive_guards.py: expand conftest import comment to explain why the direct conftest import is intentional and correct
This commit is contained in:
@@ -195,7 +195,7 @@ class TestHttpErrorHandling:
|
||||
@respx.mock
|
||||
async def test_invalid_json_response(self) -> None:
|
||||
respx.post(API_URL).mock(return_value=httpx.Response(200, text="not json"))
|
||||
with pytest.raises(ToolError, match="invalid response"):
|
||||
with pytest.raises(ToolError, match=r"invalid response.*not valid JSON"):
|
||||
await make_graphql_request("query { online }")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user