Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for test_read_items_invalid_item_id (0.29 sec)

  1. tests/test_tutorial/test_path_params_numeric_validations/test_tutorial001.py

    def test_read_items(client: TestClient, path, expected_response):
        response = client.get(path)
        assert response.status_code == 200, response.text
        assert response.json() == expected_response
    
    
    def test_read_items_invalid_item_id(client: TestClient):
        response = client.get("/items/invalid_id")
        assert response.status_code == 422, response.text
        assert response.json() == {
            "detail": [
                {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_path_params_numeric_validations/test_tutorial002_tutorial003.py

    def test_read_items(client: TestClient, path, expected_response):
        response = client.get(path)
        assert response.status_code == 200, response.text
        assert response.json() == expected_response
    
    
    def test_read_items_invalid_item_id(client: TestClient):
        response = client.get("/items/invalid_id?q=somequery")
        assert response.status_code == 422, response.text
        assert response.json() == {
            "detail": [
                {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 5.6K bytes
    - Viewed (0)
Back to top