Home / File/ test_params_repr.py — fastapi Source File

test_params_repr.py — fastapi Source File

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

File python FastAPI Routing 8 imports 27 functions

Entity Profile

Dependency Diagram

graph LR
  57079e20_c1db_680d_4e8c_41aad0716399["test_params_repr.py"]
  0dda2280_3359_8460_301c_e98c77e78185["typing"]
  57079e20_c1db_680d_4e8c_41aad0716399 --> 0dda2280_3359_8460_301c_e98c77e78185
  2bb4dd2d_8b8a_6502_751c_38eabb6ae71e["params.py"]
  57079e20_c1db_680d_4e8c_41aad0716399 --> 2bb4dd2d_8b8a_6502_751c_38eabb6ae71e
  39088a75_84d2_2fdd_bbcc_caee5cd26458["Body"]
  57079e20_c1db_680d_4e8c_41aad0716399 --> 39088a75_84d2_2fdd_bbcc_caee5cd26458
  94c0cfb4_5772_6ec4_cab0_28fdc17409df["Cookie"]
  57079e20_c1db_680d_4e8c_41aad0716399 --> 94c0cfb4_5772_6ec4_cab0_28fdc17409df
  4d6882ff_aa8b_d88c_9032_0d7c216d2cf9["Header"]
  57079e20_c1db_680d_4e8c_41aad0716399 --> 4d6882ff_aa8b_d88c_9032_0d7c216d2cf9
  a15334a5_304f_0e4c_dce0_12ffde49a6b7["Param"]
  57079e20_c1db_680d_4e8c_41aad0716399 --> a15334a5_304f_0e4c_dce0_12ffde49a6b7
  7b74bdd9_8c7e_4e14_fc03_f56c0eeb6784["Path"]
  57079e20_c1db_680d_4e8c_41aad0716399 --> 7b74bdd9_8c7e_4e14_fc03_f56c0eeb6784
  98b7c9aa_2d30_61cc_24c4_7cde1e202f14["Query"]
  57079e20_c1db_680d_4e8c_41aad0716399 --> 98b7c9aa_2d30_61cc_24c4_7cde1e202f14
  style 57079e20_c1db_680d_4e8c_41aad0716399 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from typing import Any

from fastapi.params import Body, Cookie, Header, Param, Path, Query

test_data: list[Any] = ["teststr", None, ..., 1, []]


def get_user():
    return {}  # pragma: no cover


def test_param_repr_str():
    assert repr(Param("teststr")) == "Param(teststr)"


def test_param_repr_none():
    assert repr(Param(None)) == "Param(None)"


def test_param_repr_ellipsis():
    assert repr(Param(...)) == "Param(PydanticUndefined)"


def test_param_repr_number():
    assert repr(Param(1)) == "Param(1)"


def test_param_repr_list():
    assert repr(Param([])) == "Param([])"


def test_path_repr():
    assert repr(Path()) == "Path(PydanticUndefined)"
    assert repr(Path(...)) == "Path(PydanticUndefined)"


def test_query_repr_str():
    assert repr(Query("teststr")) == "Query(teststr)"


def test_query_repr_none():
    assert repr(Query(None)) == "Query(None)"


def test_query_repr_ellipsis():
    assert repr(Query(...)) == "Query(PydanticUndefined)"


def test_query_repr_number():
    assert repr(Query(1)) == "Query(1)"


def test_query_repr_list():
    assert repr(Query([])) == "Query([])"


def test_header_repr_str():
    assert repr(Header("teststr")) == "Header(teststr)"


def test_header_repr_none():
    assert repr(Header(None)) == "Header(None)"


def test_header_repr_ellipsis():
    assert repr(Header(...)) == "Header(PydanticUndefined)"


def test_header_repr_number():
    assert repr(Header(1)) == "Header(1)"


def test_header_repr_list():
    assert repr(Header([])) == "Header([])"


def test_cookie_repr_str():
    assert repr(Cookie("teststr")) == "Cookie(teststr)"


def test_cookie_repr_none():
    assert repr(Cookie(None)) == "Cookie(None)"


def test_cookie_repr_ellipsis():
    assert repr(Cookie(...)) == "Cookie(PydanticUndefined)"


def test_cookie_repr_number():
    assert repr(Cookie(1)) == "Cookie(1)"


def test_cookie_repr_list():
    assert repr(Cookie([])) == "Cookie([])"


def test_body_repr_str():
    assert repr(Body("teststr")) == "Body(teststr)"


def test_body_repr_none():
    assert repr(Body(None)) == "Body(None)"


def test_body_repr_ellipsis():
    assert repr(Body(...)) == "Body(PydanticUndefined)"


def test_body_repr_number():
    assert repr(Body(1)) == "Body(1)"


def test_body_repr_list():
    assert repr(Body([])) == "Body([])"

Domain

Subdomains

Frequently Asked Questions

What does test_params_repr.py do?
test_params_repr.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_params_repr.py?
test_params_repr.py defines 27 function(s): get_user, test_body_repr_ellipsis, test_body_repr_list, test_body_repr_none, test_body_repr_number, test_body_repr_str, test_cookie_repr_ellipsis, test_cookie_repr_list, test_cookie_repr_none, test_cookie_repr_number, and 17 more.
What does test_params_repr.py depend on?
test_params_repr.py imports 8 module(s): Body, Cookie, Header, Param, Path, Query, params.py, typing.
Where is test_params_repr.py in the architecture?
test_params_repr.py is located at tests/test_params_repr.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