Home / Function/ test_no_response_model_objectlist() — fastapi Function Reference

test_no_response_model_objectlist() — fastapi Function Reference

Architecture documentation for the test_no_response_model_objectlist() function in test_serialize_response_dataclass.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  2d97a676_993a_2e14_2b76_8eedc86bf699["test_no_response_model_objectlist()"]
  cc2e05a7_3368_3936_0f86_18c75f23ff0c["test_serialize_response_dataclass.py"]
  2d97a676_993a_2e14_2b76_8eedc86bf699 -->|defined in| cc2e05a7_3368_3936_0f86_18c75f23ff0c
  style 2d97a676_993a_2e14_2b76_8eedc86bf699 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_serialize_response_dataclass.py lines 172–194

def test_no_response_model_objectlist():
    response = client.get("/items/no-response-model/objectlist")
    response.raise_for_status()
    assert response.json() == [
        {
            "name": "foo",
            "date": datetime(2021, 7, 26).isoformat(),
            "price": None,
            "owner_ids": None,
        },
        {
            "name": "bar",
            "date": datetime(2021, 7, 26).isoformat(),
            "price": 1.0,
            "owner_ids": None,
        },
        {
            "name": "baz",
            "date": datetime(2021, 7, 26).isoformat(),
            "price": 2.0,
            "owner_ids": [1, 2, 3],
        },
    ]

Domain

Subdomains

Frequently Asked Questions

What does test_no_response_model_objectlist() do?
test_no_response_model_objectlist() is a function in the fastapi codebase, defined in tests/test_serialize_response_dataclass.py.
Where is test_no_response_model_objectlist() defined?
test_no_response_model_objectlist() is defined in tests/test_serialize_response_dataclass.py at line 172.

Analyze Your Own Codebase

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

Try Supermodel Free