Sprint 0 / #19: OpenAPI 3.1 контракт API v1 + TS-клиент и контрактные тесты #57
@@ -314,7 +314,7 @@ def test_websocket_requires_token(client: TestClient) -> None:
|
||||
|
||||
|
||||
def test_response_schema_lookup_fails_for_unknown_response(spec: dict[str, Any], client: TestClient) -> None:
|
||||
"""Неописанный в контракте ответ — ошибка контракта, не молчаливый пропуск."""
|
||||
"""Неописанный в контракте ответ — ошибка контракта, а не молчаливый пропуск."""
|
||||
response = client.get("/api/v1/health")
|
||||
with pytest.raises(ContractViolationError):
|
||||
validate_response(spec, "/api/v1/health", "get", 418, response.json())
|
||||
|
||||
Reference in New Issue
Block a user