test_additional_response_extra.py — fastapi Source File
Architecture documentation for test_additional_response_extra.py, a python file in the fastapi codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR bd4d3106_c5f1_7cf3_dbd7_34264f9183d9["test_additional_response_extra.py"] 534f6e44_61b8_3c38_8b89_6934a6df9802["__init__.py"] bd4d3106_c5f1_7cf3_dbd7_34264f9183d9 --> 534f6e44_61b8_3c38_8b89_6934a6df9802 a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"] bd4d3106_c5f1_7cf3_dbd7_34264f9183d9 --> a7c04dee_ee23_5891_b185_47ff6bed036d a7f4e7b0_9725_db90_5cbc_7ca8211b323a["inline_snapshot"] bd4d3106_c5f1_7cf3_dbd7_34264f9183d9 --> a7f4e7b0_9725_db90_5cbc_7ca8211b323a style bd4d3106_c5f1_7cf3_dbd7_34264f9183d9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from fastapi import APIRouter, FastAPI
from fastapi.testclient import TestClient
from inline_snapshot import snapshot
router = APIRouter()
sub_router = APIRouter()
app = FastAPI()
@sub_router.get("/")
def read_item():
return {"id": "foo"}
router.include_router(sub_router, prefix="/items")
app.include_router(router)
client = TestClient(app)
def test_path_operation():
response = client.get("/items/")
assert response.status_code == 200, response.text
assert response.json() == {"id": "foo"}
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": {
"/items/": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {"application/json": {"schema": {}}},
}
},
"summary": "Read Item",
"operationId": "read_item_items__get",
}
}
},
}
)
Domain
Subdomains
Dependencies
- __init__.py
- inline_snapshot
- testclient.py
Source
Frequently Asked Questions
What does test_additional_response_extra.py do?
test_additional_response_extra.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_additional_response_extra.py?
test_additional_response_extra.py defines 3 function(s): read_item, test_openapi_schema, test_path_operation.
What does test_additional_response_extra.py depend on?
test_additional_response_extra.py imports 3 module(s): __init__.py, inline_snapshot, testclient.py.
Where is test_additional_response_extra.py in the architecture?
test_additional_response_extra.py is located at tests/test_additional_response_extra.py (domain: FastAPI, subdomain: Applications, directory: tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free