test_main.py — fastapi Source File
Architecture documentation for test_main.py, a python file in the fastapi codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 81de4f93_7e7e_1b50_69e8_d426ecbe43f9["test_main.py"] b8ed6e97_3d88_1f57_69d0_01b9c4f38398["config.py"] 81de4f93_7e7e_1b50_69e8_d426ecbe43f9 --> b8ed6e97_3d88_1f57_69d0_01b9c4f38398 4c4b4fc1_d3f4_2303_52b4_b4d73cc680b6["Settings"] 81de4f93_7e7e_1b50_69e8_d426ecbe43f9 --> 4c4b4fc1_d3f4_2303_52b4_b4d73cc680b6 ae20e89f_7856_dd94_e2db_bfb215d5fe64["main.py"] 81de4f93_7e7e_1b50_69e8_d426ecbe43f9 --> ae20e89f_7856_dd94_e2db_bfb215d5fe64 b1512630_b6e8_3475_0fc9_cc4bfba13f49["get_settings"] 81de4f93_7e7e_1b50_69e8_d426ecbe43f9 --> b1512630_b6e8_3475_0fc9_cc4bfba13f49 a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"] 81de4f93_7e7e_1b50_69e8_d426ecbe43f9 --> a7c04dee_ee23_5891_b185_47ff6bed036d style 81de4f93_7e7e_1b50_69e8_d426ecbe43f9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from fastapi.testclient import TestClient
from .config import Settings
from .main import app, get_settings
client = TestClient(app)
def get_settings_override():
return Settings(admin_email="testing_admin@example.com")
app.dependency_overrides[get_settings] = get_settings_override
def test_app():
response = client.get("/info")
data = response.json()
assert data == {
"app_name": "Awesome API",
"admin_email": "testing_admin@example.com",
"items_per_user": 50,
}
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does test_main.py do?
test_main.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_main.py?
test_main.py defines 2 function(s): get_settings_override, test_app.
What does test_main.py depend on?
test_main.py imports 5 module(s): Settings, config.py, get_settings, main.py, testclient.py.
Where is test_main.py in the architecture?
test_main.py is located at docs_src/settings/app02_py39/test_main.py (domain: FastAPI, subdomain: Applications, directory: docs_src/settings/app02_py39).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free