test_tutorial009_tutorial009b.py — fastapi Source File
Architecture documentation for test_tutorial009_tutorial009b.py, a python file in the fastapi codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR d00811dd_6f4c_6c9e_f545_dbe38add2ba5["test_tutorial009_tutorial009b.py"] 498db554_9e30_154f_dda1_162f24e2873b["utils"] d00811dd_6f4c_6c9e_f545_dbe38add2ba5 --> 498db554_9e30_154f_dda1_162f24e2873b 83e01a9c_50a9_bec9_6f86_8e729106de01["importlib"] d00811dd_6f4c_6c9e_f545_dbe38add2ba5 --> 83e01a9c_50a9_bec9_6f86_8e729106de01 fb2d9376_ca24_f2b2_f130_cc10e9f2e732["types"] d00811dd_6f4c_6c9e_f545_dbe38add2ba5 --> fb2d9376_ca24_f2b2_f130_cc10e9f2e732 d1bf66df_8a92_7a7c_dab4_0865060effa4["unittest.mock"] d00811dd_6f4c_6c9e_f545_dbe38add2ba5 --> d1bf66df_8a92_7a7c_dab4_0865060effa4 5befe8bf_65d1_d058_6b78_4a597a8488e9["pytest"] d00811dd_6f4c_6c9e_f545_dbe38add2ba5 --> 5befe8bf_65d1_d058_6b78_4a597a8488e9 style d00811dd_6f4c_6c9e_f545_dbe38add2ba5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import importlib
from types import ModuleType
from unittest.mock import patch
import pytest
from ...utils import needs_py310
@pytest.fixture(
name="module",
params=[
pytest.param("tutorial009_py39"),
pytest.param("tutorial009_py310", marks=needs_py310),
pytest.param("tutorial009b_py39"),
],
)
def get_module(request: pytest.FixtureRequest):
mod = importlib.import_module(f"docs_src.python_types.{request.param}")
return mod
def test_say_hi(module: ModuleType):
with patch("builtins.print") as mock_print:
module.say_hi("FastAPI")
module.say_hi()
assert mock_print.call_count == 2
call_args = [arg.args for arg in mock_print.call_args_list]
assert call_args == [
("Hey FastAPI!",),
("Hello World",),
]
Domain
Subdomains
Functions
Dependencies
- importlib
- pytest
- types
- unittest.mock
- utils
Source
Frequently Asked Questions
What does test_tutorial009_tutorial009b.py do?
test_tutorial009_tutorial009b.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Routing subdomain.
What functions are defined in test_tutorial009_tutorial009b.py?
test_tutorial009_tutorial009b.py defines 2 function(s): get_module, test_say_hi.
What does test_tutorial009_tutorial009b.py depend on?
test_tutorial009_tutorial009b.py imports 5 module(s): importlib, pytest, types, unittest.mock, utils.
Where is test_tutorial009_tutorial009b.py in the architecture?
test_tutorial009_tutorial009b.py is located at tests/test_tutorial/test_python_types/test_tutorial009_tutorial009b.py (domain: FastAPI, subdomain: Routing, directory: tests/test_tutorial/test_python_types).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free