Home / File/ test_tutorial008b.py — fastapi Source File

test_tutorial008b.py — fastapi Source File

Architecture documentation for test_tutorial008b.py, a python file in the fastapi codebase. 5 imports, 0 dependents.

File python FastAPI Routing 5 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  90f1cad2_d6bc_476e_be77_f28bd8b63425["test_tutorial008b.py"]
  498db554_9e30_154f_dda1_162f24e2873b["utils"]
  90f1cad2_d6bc_476e_be77_f28bd8b63425 --> 498db554_9e30_154f_dda1_162f24e2873b
  83e01a9c_50a9_bec9_6f86_8e729106de01["importlib"]
  90f1cad2_d6bc_476e_be77_f28bd8b63425 --> 83e01a9c_50a9_bec9_6f86_8e729106de01
  fb2d9376_ca24_f2b2_f130_cc10e9f2e732["types"]
  90f1cad2_d6bc_476e_be77_f28bd8b63425 --> fb2d9376_ca24_f2b2_f130_cc10e9f2e732
  d1bf66df_8a92_7a7c_dab4_0865060effa4["unittest.mock"]
  90f1cad2_d6bc_476e_be77_f28bd8b63425 --> d1bf66df_8a92_7a7c_dab4_0865060effa4
  5befe8bf_65d1_d058_6b78_4a597a8488e9["pytest"]
  90f1cad2_d6bc_476e_be77_f28bd8b63425 --> 5befe8bf_65d1_d058_6b78_4a597a8488e9
  style 90f1cad2_d6bc_476e_be77_f28bd8b63425 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("tutorial008b_py39"),
        pytest.param("tutorial008b_py310", marks=needs_py310),
    ],
)
def get_module(request: pytest.FixtureRequest):
    mod = importlib.import_module(f"docs_src.python_types.{request.param}")
    return mod


def test_process_items(module: ModuleType):
    with patch("builtins.print") as mock_print:
        module.process_item("a")

    assert mock_print.call_count == 1
    mock_print.assert_called_with("a")

Domain

Subdomains

Dependencies

  • importlib
  • pytest
  • types
  • unittest.mock
  • utils

Frequently Asked Questions

What does test_tutorial008b.py do?
test_tutorial008b.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_tutorial008b.py?
test_tutorial008b.py defines 2 function(s): get_module, test_process_items.
What does test_tutorial008b.py depend on?
test_tutorial008b.py imports 5 module(s): importlib, pytest, types, unittest.mock, utils.
Where is test_tutorial008b.py in the architecture?
test_tutorial008b.py is located at tests/test_tutorial/test_python_types/test_tutorial008b.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