Home / File/ test_include_route.py — fastapi Source File

test_include_route.py — fastapi Source File

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

File python FastAPI Routing 3 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  d8a8e7ff_9491_0f33_828c_8cc7b089a9b4["test_include_route.py"]
  534f6e44_61b8_3c38_8b89_6934a6df9802["__init__.py"]
  d8a8e7ff_9491_0f33_828c_8cc7b089a9b4 --> 534f6e44_61b8_3c38_8b89_6934a6df9802
  967b6712_70e2_f5fa_f671_7c149857a445["responses.py"]
  d8a8e7ff_9491_0f33_828c_8cc7b089a9b4 --> 967b6712_70e2_f5fa_f671_7c149857a445
  a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"]
  d8a8e7ff_9491_0f33_828c_8cc7b089a9b4 --> a7c04dee_ee23_5891_b185_47ff6bed036d
  style d8a8e7ff_9491_0f33_828c_8cc7b089a9b4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from fastapi import APIRouter, FastAPI, Request
from fastapi.responses import JSONResponse
from fastapi.testclient import TestClient

app = FastAPI()
router = APIRouter()


@router.route("/items/")
def read_items(request: Request):
    return JSONResponse({"hello": "world"})


app.include_router(router)

client = TestClient(app)


def test_sub_router():
    response = client.get("/items/")
    assert response.status_code == 200, response.text
    assert response.json() == {"hello": "world"}

Domain

Subdomains

Frequently Asked Questions

What does test_include_route.py do?
test_include_route.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_include_route.py?
test_include_route.py defines 2 function(s): read_items, test_sub_router.
What does test_include_route.py depend on?
test_include_route.py imports 3 module(s): __init__.py, responses.py, testclient.py.
Where is test_include_route.py in the architecture?
test_include_route.py is located at tests/test_include_route.py (domain: FastAPI, subdomain: Routing, directory: tests).

Analyze Your Own Codebase

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

Try Supermodel Free