test_path.py — fastapi Source File
Architecture documentation for test_path.py, a python file in the fastapi codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 114b7346_56f1_5baa_099f_1acd87f8d21f["test_path.py"] 224633e5_139d_dee9_c17b_aeac8a2f6027["main.py"] 114b7346_56f1_5baa_099f_1acd87f8d21f --> 224633e5_139d_dee9_c17b_aeac8a2f6027 a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"] 114b7346_56f1_5baa_099f_1acd87f8d21f --> a7c04dee_ee23_5891_b185_47ff6bed036d style 114b7346_56f1_5baa_099f_1acd87f8d21f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from fastapi.testclient import TestClient
from .main import app
client = TestClient(app)
def test_text_get():
response = client.get("/text")
assert response.status_code == 200, response.text
assert response.json() == "Hello World"
def test_nonexistent():
response = client.get("/nonexistent")
assert response.status_code == 404, response.text
assert response.json() == {"detail": "Not Found"}
def test_path_foobar():
response = client.get("/path/foobar")
assert response.status_code == 200
assert response.json() == "foobar"
def test_path_str_foobar():
response = client.get("/path/str/foobar")
assert response.status_code == 200
assert response.json() == "foobar"
def test_path_str_42():
response = client.get("/path/str/42")
assert response.status_code == 200
assert response.json() == "42"
def test_path_str_True():
response = client.get("/path/str/True")
assert response.status_code == 200
assert response.json() == "True"
def test_path_int_foobar():
response = client.get("/path/int/foobar")
assert response.status_code == 422
assert response.json() == {
"detail": [
{
"type": "int_parsing",
"loc": ["path", "item_id"],
"msg": "Input should be a valid integer, unable to parse string as an integer",
"input": "foobar",
}
]
}
def test_path_int_True():
response = client.get("/path/int/True")
// ... (721 more lines)
Domain
Subdomains
Functions
- test_nonexistent()
- test_path_bool_0()
- test_path_bool_1()
- test_path_bool_42()
- test_path_bool_42_5()
- test_path_bool_False()
- test_path_bool_True()
- test_path_bool_false()
- test_path_bool_foobar()
- test_path_bool_true()
- test_path_float_42()
- test_path_float_42_5()
- test_path_float_True()
- test_path_float_foobar()
- test_path_foobar()
- test_path_int_42()
- test_path_int_42_5()
- test_path_int_True()
- test_path_int_foobar()
- test_path_param_foo()
- test_path_param_ge_2()
- test_path_param_ge_3()
- test_path_param_ge_42()
- test_path_param_ge_int_2()
- test_path_param_ge_int_2_7()
- test_path_param_ge_int_3()
- test_path_param_ge_int_42()
- test_path_param_gt0_0()
- test_path_param_gt0_0_05()
- test_path_param_gt_2()
- test_path_param_gt_42()
- test_path_param_gt_int_2()
- test_path_param_gt_int_2_7()
- test_path_param_gt_int_42()
- test_path_param_le_2()
- test_path_param_le_3()
- test_path_param_le_42()
- test_path_param_le_ge_1()
- test_path_param_le_ge_2()
- test_path_param_le_ge_3()
- test_path_param_le_ge_4()
- test_path_param_le_ge_int_1()
- test_path_param_le_ge_int_2()
- test_path_param_le_ge_int_2_7()
- test_path_param_le_ge_int_3()
- test_path_param_le_ge_int_4()
- test_path_param_le_int_2()
- test_path_param_le_int_2_7()
- test_path_param_le_int_3()
- test_path_param_le_int_42()
- test_path_param_lt0_0()
- test_path_param_lt0__1()
- test_path_param_lt_2()
- test_path_param_lt_42()
- test_path_param_lt_gt_0()
- test_path_param_lt_gt_2()
- test_path_param_lt_gt_4()
- test_path_param_lt_gt_int_0()
- test_path_param_lt_gt_int_2()
- test_path_param_lt_gt_int_2_7()
- test_path_param_lt_gt_int_4()
- test_path_param_lt_int_2()
- test_path_param_lt_int_2_7()
- test_path_param_lt_int_42()
- test_path_param_maxlength_foo()
- test_path_param_maxlength_foobar()
- test_path_param_min_maxlength_f()
- test_path_param_min_maxlength_foo()
- test_path_param_min_maxlength_foobar()
- test_path_param_minlength_fo()
- test_path_param_minlength_foo()
- test_path_str_42()
- test_path_str_True()
- test_path_str_foobar()
- test_text_get()
Dependencies
Source
Frequently Asked Questions
What does test_path.py do?
test_path.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_path.py?
test_path.py defines 75 function(s): test_nonexistent, test_path_bool_0, test_path_bool_1, test_path_bool_42, test_path_bool_42_5, test_path_bool_False, test_path_bool_True, test_path_bool_false, test_path_bool_foobar, test_path_bool_true, and 65 more.
What does test_path.py depend on?
test_path.py imports 2 module(s): main.py, testclient.py.
Where is test_path.py in the architecture?
test_path.py is located at tests/test_path.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