Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_get_validation_error (0.08 sec)

  1. 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)
Back to top