Home / Function/ test_header_param_model_extra() — fastapi Function Reference

test_header_param_model_extra() — fastapi Function Reference

Architecture documentation for the test_header_param_model_extra() function in test_tutorial002.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  95806179_1813_4eee_dde7_5606a5fad88e["test_header_param_model_extra()"]
  cb82d073_4960_54e5_9dbf_d909660a610a["test_tutorial002.py"]
  95806179_1813_4eee_dde7_5606a5fad88e -->|defined in| cb82d073_4960_54e5_9dbf_d909660a610a
  style 95806179_1813_4eee_dde7_5606a5fad88e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_header_param_models/test_tutorial002.py lines 77–93

def test_header_param_model_extra(client: TestClient):
    response = client.get(
        "/items/", headers=[("save-data", "true"), ("tool", "plumbus")]
    )
    assert response.status_code == 422, response.text
    assert response.json() == snapshot(
        {
            "detail": [
                {
                    "type": "extra_forbidden",
                    "loc": ["header", "tool"],
                    "msg": "Extra inputs are not permitted",
                    "input": "plumbus",
                }
            ]
        }
    )

Domain

Subdomains

Frequently Asked Questions

What does test_header_param_model_extra() do?
test_header_param_model_extra() is a function in the fastapi codebase, defined in tests/test_tutorial/test_header_param_models/test_tutorial002.py.
Where is test_header_param_model_extra() defined?
test_header_param_model_extra() is defined in tests/test_tutorial/test_header_param_models/test_tutorial002.py at line 77.

Analyze Your Own Codebase

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

Try Supermodel Free