Home / Function/ test_jsonable_encoder_requiring_error() — fastapi Function Reference

test_jsonable_encoder_requiring_error() — fastapi Function Reference

Architecture documentation for the test_jsonable_encoder_requiring_error() function in test_multi_body_errors.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  9a9e46ce_8d9d_40fc_6a98_f7cf053efbbb["test_jsonable_encoder_requiring_error()"]
  789994cf_4c09_9ccd_b82e_26362f9d8f29["test_multi_body_errors.py"]
  9a9e46ce_8d9d_40fc_6a98_f7cf053efbbb -->|defined in| 789994cf_4c09_9ccd_b82e_26362f9d8f29
  style 9a9e46ce_8d9d_40fc_6a98_f7cf053efbbb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_multi_body_errors.py lines 40–53

def test_jsonable_encoder_requiring_error():
    response = client.post("/items/", json=[{"name": "Foo", "age": -1.0}])
    assert response.status_code == 422, response.text
    assert response.json() == {
        "detail": [
            {
                "type": "greater_than",
                "loc": ["body", 0, "age"],
                "msg": "Input should be greater than 0",
                "input": -1.0,
                "ctx": {"gt": 0},
            }
        ]
    }

Domain

Subdomains

Frequently Asked Questions

What does test_jsonable_encoder_requiring_error() do?
test_jsonable_encoder_requiring_error() is a function in the fastapi codebase, defined in tests/test_multi_body_errors.py.
Where is test_jsonable_encoder_requiring_error() defined?
test_jsonable_encoder_requiring_error() is defined in tests/test_multi_body_errors.py at line 40.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free