Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for float_parsing (0.05 sec)

  1. tests/test_tutorial/test_dataclasses/test_tutorial001.py

        response = client.post("/items/", json={"name": "Foo", "price": "invalid price"})
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
                    "type": "float_parsing",
                    "loc": ["body", "price"],
                    "msg": "Input should be a valid number, unable to parse string as a number",
                    "input": "invalid price",
                }
            ]
        }
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_body/test_tutorial001.py

        response = client.post("/items/", json={"name": "Foo", "price": "twenty"})
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
                    "type": "float_parsing",
                    "loc": ["body", "price"],
                    "msg": "Input should be a valid number, unable to parse string as a number",
                    "input": "twenty",
                }
            ]
        }
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  3. tests/test_path.py

    def test_path_float_foobar():
        response = client.get("/path/float/foobar")
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
                    "type": "float_parsing",
                    "loc": ["path", "item_id"],
                    "msg": "Input should be a valid number, unable to parse string as a number",
                    "input": "foobar",
                }
            ]
        }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 20.5K bytes
    - Viewed (1)
Back to top