test_tutorial003b.py — fastapi Source File
Architecture documentation for test_tutorial003b.py, a python file in the fastapi codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c80e653c_994b_32a1_d5d2_bcad493d70a0["test_tutorial003b.py"] 772c78ef_aafa_0328_92af_34281be7cbc2["asyncio"] c80e653c_994b_32a1_d5d2_bcad493d70a0 --> 772c78ef_aafa_0328_92af_34281be7cbc2 a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"] c80e653c_994b_32a1_d5d2_bcad493d70a0 --> a7c04dee_ee23_5891_b185_47ff6bed036d a7f4e7b0_9725_db90_5cbc_7ca8211b323a["inline_snapshot"] c80e653c_994b_32a1_d5d2_bcad493d70a0 --> a7f4e7b0_9725_db90_5cbc_7ca8211b323a 9f0955e8_3e2e_20b6_912b_1d5584603447["tutorial003b_py39.py"] c80e653c_994b_32a1_d5d2_bcad493d70a0 --> 9f0955e8_3e2e_20b6_912b_1d5584603447 21465f18_a143_3aaa_9494_770e123bffd3["read_users2"] c80e653c_994b_32a1_d5d2_bcad493d70a0 --> 21465f18_a143_3aaa_9494_770e123bffd3 style c80e653c_994b_32a1_d5d2_bcad493d70a0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import asyncio
from fastapi.testclient import TestClient
from inline_snapshot import snapshot
from docs_src.path_params.tutorial003b_py39 import app, read_users2
client = TestClient(app)
def test_get_users():
response = client.get("/users")
assert response.status_code == 200, response.text
assert response.json() == ["Rick", "Morty"]
def test_read_users2(): # Just for coverage
assert asyncio.run(read_users2()) == ["Bean", "Elfo"]
def test_openapi_schema():
response = client.get("/openapi.json")
assert response.status_code == 200, response.text
assert response.json() == snapshot(
{
"openapi": "3.1.0",
"info": {"title": "FastAPI", "version": "0.1.0"},
"paths": {
"/users": {
"get": {
"operationId": "read_users2_users_get",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {},
},
},
"description": "Successful Response",
},
},
"summary": "Read Users2",
},
},
},
}
)
Domain
Subdomains
Dependencies
- asyncio
- inline_snapshot
- read_users2
- testclient.py
- tutorial003b_py39.py
Source
Frequently Asked Questions
What does test_tutorial003b.py do?
test_tutorial003b.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Applications subdomain.
What functions are defined in test_tutorial003b.py?
test_tutorial003b.py defines 3 function(s): test_get_users, test_openapi_schema, test_read_users2.
What does test_tutorial003b.py depend on?
test_tutorial003b.py imports 5 module(s): asyncio, inline_snapshot, read_users2, testclient.py, tutorial003b_py39.py.
Where is test_tutorial003b.py in the architecture?
test_tutorial003b.py is located at tests/test_tutorial/test_path_params/test_tutorial003b.py (domain: FastAPI, subdomain: Applications, directory: tests/test_tutorial/test_path_params).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free