test_tutorial001.py — fastapi Source File
Architecture documentation for test_tutorial001.py, a python file in the fastapi codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 9b6a0624_1cc7_f66c_d84e_bacec1e0e0a1["test_tutorial001.py"] af9b440f_13c4_d91e_f8ae_bfe199b060d2["os"] 9b6a0624_1cc7_f66c_d84e_bacec1e0e0a1 --> af9b440f_13c4_d91e_f8ae_bfe199b060d2 b3e303a2_3f2d_638d_930c_3a5dcc2f5a42["pathlib"] 9b6a0624_1cc7_f66c_d84e_bacec1e0e0a1 --> b3e303a2_3f2d_638d_930c_3a5dcc2f5a42 a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"] 9b6a0624_1cc7_f66c_d84e_bacec1e0e0a1 --> a7c04dee_ee23_5891_b185_47ff6bed036d ce183140_8b25_64e3_5908_2161ef193af3["tutorial001_py39.py"] 9b6a0624_1cc7_f66c_d84e_bacec1e0e0a1 --> ce183140_8b25_64e3_5908_2161ef193af3 style 9b6a0624_1cc7_f66c_d84e_bacec1e0e0a1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import os
from pathlib import Path
from fastapi.testclient import TestClient
from docs_src.background_tasks.tutorial001_py39 import app
client = TestClient(app)
def test():
log = Path("log.txt")
if log.is_file():
os.remove(log) # pragma: no cover
response = client.post("/send-notification/foo@example.com")
assert response.status_code == 200, response.text
assert response.json() == {"message": "Notification sent in the background"}
with open("./log.txt") as f:
assert "notification for foo@example.com: some notification" in f.read()
Domain
Subdomains
Functions
Dependencies
- os
- pathlib
- testclient.py
- tutorial001_py39.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, Responses subdomain.
What functions are defined in test_tutorial001.py?
test_tutorial001.py defines 1 function(s): test.
What does test_tutorial001.py depend on?
test_tutorial001.py imports 4 module(s): os, pathlib, testclient.py, tutorial001_py39.py.
Where is test_tutorial001.py in the architecture?
test_tutorial001.py is located at tests/test_tutorial/test_background_tasks/test_tutorial001.py (domain: FastAPI, subdomain: Responses, directory: tests/test_tutorial/test_background_tasks).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free