Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for test_get_http_error (0.07 sec)

  1. tests/test_tutorial/test_handling_errors/test_tutorial004.py

            "value is not a valid integer" in response.text
            or "Input should be a valid integer, unable to parse string as an integer"
            in response.text
        )
    
    
    def test_get_http_error():
        response = client.get("/items/3")
        assert response.status_code == 418, response.text
        assert response.content == b"Nope! I don't like 3."
    
    
    def test_get():
        response = client.get("/items/2")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_handling_errors/test_tutorial006.py

                        "msg": "value is not a valid integer",
                        "type": "type_error.integer",
                    }
                ]
            }
        )
    
    
    def test_get_http_error():
        response = client.get("/items/3")
        assert response.status_code == 418, response.text
        assert response.json() == {"detail": "Nope! I don't like 3."}
    
    
    def test_get():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top