Home / Function/ test_read_items_item_id_less_than_one() — fastapi Function Reference

test_read_items_item_id_less_than_one() — fastapi Function Reference

Architecture documentation for the test_read_items_item_id_less_than_one() function in test_tutorial004.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  9bbdd174_3fbb_c827_ba76_b2a37d994278["test_read_items_item_id_less_than_one()"]
  f4489e8a_daa2_3c9e_6cd5_efc05f69e413["test_tutorial004.py"]
  9bbdd174_3fbb_c827_ba76_b2a37d994278 -->|defined in| f4489e8a_daa2_3c9e_6cd5_efc05f69e413
  style 9bbdd174_3fbb_c827_ba76_b2a37d994278 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_path_params_numeric_validations/test_tutorial004.py lines 50–63

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

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free