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:
Jacob Magar
2026-02-19 02:25:21 -05:00
parent 1751bc2984
commit 2a5b19c42f
2 changed files with 14 additions and 3 deletions

View File

@@ -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 }")