test_header_param_model_no_underscore() — fastapi Function Reference
Architecture documentation for the test_header_param_model_no_underscore() function in test_tutorial003.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 9b64822d_50a5_b8a2_88c2_39962a9349de["test_header_param_model_no_underscore()"] bac9c043_6f53_0e72_1b63_6c58c72ba38f["test_tutorial003.py"] 9b64822d_50a5_b8a2_88c2_39962a9349de -->|defined in| bac9c043_6f53_0e72_1b63_6c58c72ba38f style 9b64822d_50a5_b8a2_88c2_39962a9349de fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_header_param_models/test_tutorial003.py lines 47–81
def test_header_param_model_no_underscore(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 == 422
assert response.json() == snapshot(
{
"detail": [
{
"type": "missing",
"loc": ["header", "save_data"],
"msg": "Field required",
"input": {
"host": "testserver",
"traceparent": "123",
"x_tag": [],
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"connection": "keep-alive",
"user-agent": "testclient",
"save-data": "true",
"if-modified-since": "yesterday",
"x-tag": ["one", "two"],
},
}
]
}
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_header_param_model_no_underscore() do?
test_header_param_model_no_underscore() is a function in the fastapi codebase, defined in tests/test_tutorial/test_header_param_models/test_tutorial003.py.
Where is test_header_param_model_no_underscore() defined?
test_header_param_model_no_underscore() is defined in tests/test_tutorial/test_header_param_models/test_tutorial003.py at line 47.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free