test_query.py — fastapi Source File
Architecture documentation for test_query.py, a python file in the fastapi codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR cdb35db9_37cf_6d62_6a9d_4181458b783d["test_query.py"] 224633e5_139d_dee9_c17b_aeac8a2f6027["main.py"] cdb35db9_37cf_6d62_6a9d_4181458b783d --> 224633e5_139d_dee9_c17b_aeac8a2f6027 a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"] cdb35db9_37cf_6d62_6a9d_4181458b783d --> a7c04dee_ee23_5891_b185_47ff6bed036d style cdb35db9_37cf_6d62_6a9d_4181458b783d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from fastapi.testclient import TestClient
from .main import app
client = TestClient(app)
def test_query():
response = client.get("/query")
assert response.status_code == 422
assert response.json() == {
"detail": [
{
"type": "missing",
"loc": ["query", "query"],
"msg": "Field required",
"input": None,
}
]
}
def test_query_query_baz():
response = client.get("/query?query=baz")
assert response.status_code == 200
assert response.json() == "foo bar baz"
def test_query_not_declared_baz():
response = client.get("/query?not_declared=baz")
assert response.status_code == 422
assert response.json() == {
"detail": [
{
"type": "missing",
"loc": ["query", "query"],
"msg": "Field required",
"input": None,
}
]
}
def test_query_optional():
response = client.get("/query/optional")
assert response.status_code == 200
assert response.json() == "foo bar"
def test_query_optional_query_baz():
response = client.get("/query/optional?query=baz")
assert response.status_code == 200
assert response.json() == "foo bar baz"
def test_query_optional_not_declared_baz():
response = client.get("/query/optional?not_declared=baz")
assert response.status_code == 200
assert response.json() == "foo bar"
// ... (218 more lines)
Domain
Subdomains
Functions
- test_query()
- test_query_frozenset_query_1_query_1_query_2()
- test_query_int()
- test_query_int_default()
- test_query_int_default_query_50()
- test_query_int_default_query_foo()
- test_query_int_not_declared_baz()
- test_query_int_optional()
- test_query_int_optional_query_50()
- test_query_int_optional_query_foo()
- test_query_int_query_42()
- test_query_int_query_42_5()
- test_query_int_query_baz()
- test_query_list()
- test_query_list_default()
- test_query_list_default_empty()
- test_query_list_empty()
- test_query_not_declared_baz()
- test_query_optional()
- test_query_optional_not_declared_baz()
- test_query_optional_query_baz()
- test_query_param()
- test_query_param_query_50()
- test_query_param_required()
- test_query_param_required_int()
- test_query_param_required_int_query_50()
- test_query_param_required_int_query_foo()
- test_query_param_required_query_50()
- test_query_query_baz()
Dependencies
Source
Frequently Asked Questions
What does test_query.py do?
test_query.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Routing subdomain.
What functions are defined in test_query.py?
test_query.py defines 29 function(s): test_query, test_query_frozenset_query_1_query_1_query_2, test_query_int, test_query_int_default, test_query_int_default_query_50, test_query_int_default_query_foo, test_query_int_not_declared_baz, test_query_int_optional, test_query_int_optional_query_50, test_query_int_optional_query_foo, and 19 more.
What does test_query.py depend on?
test_query.py imports 2 module(s): main.py, testclient.py.
Where is test_query.py in the architecture?
test_query.py is located at tests/test_query.py (domain: FastAPI, subdomain: Routing, directory: tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free