- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for test_get_validation_error (0.42 sec)
-
tests/test_tutorial/test_handling_errors/test_tutorial004.py
from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial004_py39 import app client = TestClient(app) def test_get_validation_error(): response = client.get("/items/foo") assert response.status_code == 400, response.text assert "Validation errors:" in response.text assert "Field: ('path', 'item_id')" in response.text def test_get_http_error(): response = client.get("/items/3")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.4K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial006.py
from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial006_py39 import app client = TestClient(app) def test_get_validation_error(): response = client.get("/items/foo") assert response.status_code == 422, response.text assert response.json() == { "detail": [ { "type": "int_parsing", "loc": ["path", "item_id"],
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.6K bytes - Viewed (0)