- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for test_get_validation_error (0.19 sec)
-
tests/test_tutorial/test_handling_errors/test_tutorial004.py
from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial004 import app client = TestClient(app) def test_get_validation_error(): response = client.get("/items/foo") assert response.status_code == 400, response.text # TODO: remove when deprecating Pydantic v1 assert ( # TODO: remove when deprecating Pydantic v1 "path -> item_id" in response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.7K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial006.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial006 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() == IsDict( { "detail": [ { "type": "int_parsing",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4K bytes - Viewed (0)