Home / Function/ test_read_items_item_id_less_than_zero() — fastapi Function Reference

test_read_items_item_id_less_than_zero() — fastapi Function Reference

Architecture documentation for the test_read_items_item_id_less_than_zero() function in test_tutorial006.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  dc2da82d_5b00_3a77_717d_0b7689ad7b6b["test_read_items_item_id_less_than_zero()"]
  17a0f069_68bc_2155_e93d_b485ba6efa92["test_tutorial006.py"]
  dc2da82d_5b00_3a77_717d_0b7689ad7b6b -->|defined in| 17a0f069_68bc_2155_e93d_b485ba6efa92
  style dc2da82d_5b00_3a77_717d_0b7689ad7b6b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_path_params_numeric_validations/test_tutorial006.py lines 41–54

def test_read_items_item_id_less_than_zero(client: TestClient):
    response = client.get("/items/-1?q=somequery&size=5")
    assert response.status_code == 422, response.text
    assert response.json() == {
        "detail": [
            {
                "loc": ["path", "item_id"],
                "input": "-1",
                "msg": "Input should be greater than or equal to 0",
                "type": "greater_than_equal",
                "ctx": {"ge": 0},
            }
        ]
    }

Domain

Subdomains

Frequently Asked Questions

What does test_read_items_item_id_less_than_zero() do?
test_read_items_item_id_less_than_zero() is a function in the fastapi codebase, defined in tests/test_tutorial/test_path_params_numeric_validations/test_tutorial006.py.
Where is test_read_items_item_id_less_than_zero() defined?
test_read_items_item_id_less_than_zero() is defined in tests/test_tutorial/test_path_params_numeric_validations/test_tutorial006.py at line 41.

Analyze Your Own Codebase

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

Try Supermodel Free