test_tutorial001.py — fastapi Source File
Architecture documentation for test_tutorial001.py, a python file in the fastapi codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 3ce823cf_54b0_d5ea_856a_11ca602cb69e["test_tutorial001.py"] 83e01a9c_50a9_bec9_6f86_8e729106de01["importlib"] 3ce823cf_54b0_d5ea_856a_11ca602cb69e --> 83e01a9c_50a9_bec9_6f86_8e729106de01 5befe8bf_65d1_d058_6b78_4a597a8488e9["pytest"] 3ce823cf_54b0_d5ea_856a_11ca602cb69e --> 5befe8bf_65d1_d058_6b78_4a597a8488e9 a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"] 3ce823cf_54b0_d5ea_856a_11ca602cb69e --> a7c04dee_ee23_5891_b185_47ff6bed036d style 3ce823cf_54b0_d5ea_856a_11ca602cb69e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import importlib
import pytest
from fastapi.testclient import TestClient
from pytest import MonkeyPatch
@pytest.fixture(name="app", params=[pytest.param("tutorial001_py39")])
def get_app(request: pytest.FixtureRequest, monkeypatch: MonkeyPatch):
monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com")
mod = importlib.import_module(f"docs_src.settings.{request.param}")
return mod.app
def test_settings(app):
client = TestClient(app)
response = client.get("/info")
assert response.status_code == 200, response.text
assert response.json() == {
"app_name": "Awesome API",
"admin_email": "admin@example.com",
"items_per_user": 50,
}
Domain
Subdomains
Functions
Dependencies
- importlib
- pytest
- testclient.py
Source
Frequently Asked Questions
What does test_tutorial001.py do?
test_tutorial001.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_tutorial001.py?
test_tutorial001.py defines 2 function(s): get_app, test_settings.
What does test_tutorial001.py depend on?
test_tutorial001.py imports 3 module(s): importlib, pytest, testclient.py.
Where is test_tutorial001.py in the architecture?
test_tutorial001.py is located at tests/test_tutorial/test_settings/test_tutorial001.py (domain: FastAPI, subdomain: Applications, directory: tests/test_tutorial/test_settings).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free