Home / Function/ test_header_param_model() — fastapi Function Reference

test_header_param_model() — fastapi Function Reference

Architecture documentation for the test_header_param_model() function in test_tutorial001.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  136af710_4b73_519a_ea60_df7a2509b3b3["test_header_param_model()"]
  b84aa210_e69e_29d8_ee3c_078b17ed41e5["test_tutorial001.py"]
  136af710_4b73_519a_ea60_df7a2509b3b3 -->|defined in| b84aa210_e69e_29d8_ee3c_078b17ed41e5
  style 136af710_4b73_519a_ea60_df7a2509b3b3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_header_param_models/test_tutorial001.py lines 26–44

def test_header_param_model(client: TestClient):
    response = client.get(
        "/items/",
        headers=[
            ("save-data", "true"),
            ("if-modified-since", "yesterday"),
            ("traceparent", "123"),
            ("x-tag", "one"),
            ("x-tag", "two"),
        ],
    )
    assert response.status_code == 200
    assert response.json() == {
        "host": "testserver",
        "save_data": True,
        "if_modified_since": "yesterday",
        "traceparent": "123",
        "x_tag": ["one", "two"],
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free