Home / Function/ test_put_with_no_data() — fastapi Function Reference

test_put_with_no_data() — fastapi Function Reference

Architecture documentation for the test_put_with_no_data() function in test_tutorial003.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  c5fe3350_420b_e1b9_a324_755d15b8443c["test_put_with_no_data()"]
  0a70e8db_9ada_0d42_b3cc_5afb736e0b21["test_tutorial003.py"]
  c5fe3350_420b_e1b9_a324_755d15b8443c -->|defined in| 0a70e8db_9ada_0d42_b3cc_5afb736e0b21
  style c5fe3350_420b_e1b9_a324_755d15b8443c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_body/test_tutorial003.py lines 54–72

def test_put_with_no_data(client: TestClient):
    response = client.put("/items/123", json={})
    assert response.status_code == 422
    assert response.json() == {
        "detail": [
            {
                "type": "missing",
                "loc": ["body", "name"],
                "msg": "Field required",
                "input": {},
            },
            {
                "type": "missing",
                "loc": ["body", "price"],
                "msg": "Field required",
                "input": {},
            },
        ]
    }

Domain

Subdomains

Frequently Asked Questions

What does test_put_with_no_data() do?
test_put_with_no_data() is a function in the fastapi codebase, defined in tests/test_tutorial/test_body/test_tutorial003.py.
Where is test_put_with_no_data() defined?
test_put_with_no_data() is defined in tests/test_tutorial/test_body/test_tutorial003.py at line 54.

Analyze Your Own Codebase

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

Try Supermodel Free