Home / Function/ test_read_items_non_int_item_id() — fastapi Function Reference

test_read_items_non_int_item_id() — fastapi Function Reference

Architecture documentation for the test_read_items_non_int_item_id() function in test_tutorial005.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  6240979e_e060_eb15_c2bc_abfd05965ca7["test_read_items_non_int_item_id()"]
  c6143098_00dd_c743_1d45_d74fef40f342["test_tutorial005.py"]
  6240979e_e060_eb15_c2bc_abfd05965ca7 -->|defined in| c6143098_00dd_c743_1d45_d74fef40f342
  style 6240979e_e060_eb15_c2bc_abfd05965ca7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_path_params_numeric_validations/test_tutorial005.py lines 35–47

def test_read_items_non_int_item_id(client: TestClient):
    response = client.get("/items/invalid_id?q=somequery")
    assert response.status_code == 422, response.text
    assert response.json() == {
        "detail": [
            {
                "loc": ["path", "item_id"],
                "input": "invalid_id",
                "msg": "Input should be a valid integer, unable to parse string as an integer",
                "type": "int_parsing",
            }
        ]
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free