Home / File/ test_main.py — fastapi Source File

test_main.py — fastapi Source File

Architecture documentation for test_main.py, a python file in the fastapi codebase. 3 imports, 1 dependents.

File python FastAPI Applications 3 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  8f9883cb_262f_b1bd_8a17_7a4b274c1ce7["test_main.py"]
  76271aa9_e68e_6bfe_e926_4383fbee40d4["main.py"]
  8f9883cb_262f_b1bd_8a17_7a4b274c1ce7 --> 76271aa9_e68e_6bfe_e926_4383fbee40d4
  5befe8bf_65d1_d058_6b78_4a597a8488e9["pytest"]
  8f9883cb_262f_b1bd_8a17_7a4b274c1ce7 --> 5befe8bf_65d1_d058_6b78_4a597a8488e9
  d7bf38e8_5abd_e43f_3d05_a07033f7302e["httpx"]
  8f9883cb_262f_b1bd_8a17_7a4b274c1ce7 --> d7bf38e8_5abd_e43f_3d05_a07033f7302e
  2e9b8d61_c690_a061_923a_40604535487d["test_main_a.py"]
  2e9b8d61_c690_a061_923a_40604535487d --> 8f9883cb_262f_b1bd_8a17_7a4b274c1ce7
  style 8f9883cb_262f_b1bd_8a17_7a4b274c1ce7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import pytest
from httpx import ASGITransport, AsyncClient

from .main import app


@pytest.mark.anyio
async def test_root():
    async with AsyncClient(
        transport=ASGITransport(app=app), base_url="http://test"
    ) as ac:
        response = await ac.get("/")
    assert response.status_code == 200
    assert response.json() == {"message": "Tomato"}

Domain

Subdomains

Functions

Dependencies

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 1 function(s): test_root.
What does test_main.py depend on?
test_main.py imports 3 module(s): httpx, main.py, pytest.
What files import test_main.py?
test_main.py is imported by 1 file(s): test_main_a.py.
Where is test_main.py in the architecture?
test_main.py is located at docs_src/async_tests/app_a_py39/test_main.py (domain: FastAPI, subdomain: Applications, directory: docs_src/async_tests/app_a_py39).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free