Home / Function/ test_put_all() — fastapi Function Reference

test_put_all() — fastapi Function Reference

Architecture documentation for the test_put_all() function in test_tutorial001_tutorial002_tutorial003.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  5570b554_7764_6beb_7e96_ed1adf884321["test_put_all()"]
  4805b10c_df90_0eae_b943_1fe04ab3fbd7["test_tutorial001_tutorial002_tutorial003.py"]
  5570b554_7764_6beb_7e96_ed1adf884321 -->|defined in| 4805b10c_df90_0eae_b943_1fe04ab3fbd7
  style 5570b554_7764_6beb_7e96_ed1adf884321 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py lines 40–66

def test_put_all(client: TestClient, mod_name: str):
    if mod_name.startswith("tutorial003"):
        tags_expected = IsList("foo", "bar", check_order=False)
    else:
        tags_expected = ["foo", "bar", "foo"]

    response = client.put(
        "/items/123",
        json={
            "name": "Foo",
            "description": "A very nice Item",
            "price": 35.4,
            "tax": 3.2,
            "tags": ["foo", "bar", "foo"],
        },
    )
    assert response.status_code == 200, response.text
    assert response.json() == {
        "item_id": 123,
        "item": {
            "name": "Foo",
            "description": "A very nice Item",
            "price": 35.4,
            "tax": 3.2,
            "tags": tags_expected,
        },
    }

Domain

Subdomains

Frequently Asked Questions

What does test_put_all() do?
test_put_all() is a function in the fastapi codebase, defined in tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py.
Where is test_put_all() defined?
test_put_all() is defined in tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py at line 40.

Analyze Your Own Codebase

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

Try Supermodel Free