Home / Function/ test_validdict() — fastapi Function Reference

test_validdict() — fastapi Function Reference

Architecture documentation for the test_validdict() function in test_serialize_response_model.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  84a564ea_81b8_371d_bc2d_5601d86183f5["test_validdict()"]
  cbcf7fa2_afd9_b8ef_c734_42f98fa2cbd6["test_serialize_response_model.py"]
  84a564ea_81b8_371d_bc2d_5601d86183f5 -->|defined in| cbcf7fa2_afd9_b8ef_c734_42f98fa2cbd6
  style 84a564ea_81b8_371d_bc2d_5601d86183f5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_serialize_response_model.py lines 115–122

def test_validdict():
    response = client.get("/items/validdict")
    response.raise_for_status()
    assert response.json() == {
        "k1": {"aliased_name": "foo", "price": None, "owner_ids": None},
        "k2": {"aliased_name": "bar", "price": 1.0, "owner_ids": None},
        "k3": {"aliased_name": "baz", "price": 2.0, "owner_ids": [1, 2, 3]},
    }

Domain

Subdomains

Frequently Asked Questions

What does test_validdict() do?
test_validdict() is a function in the fastapi codebase, defined in tests/test_serialize_response_model.py.
Where is test_validdict() defined?
test_validdict() is defined in tests/test_serialize_response_model.py at line 115.

Analyze Your Own Codebase

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

Try Supermodel Free