Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for string_too_long (0.1 sec)

  1. tests/test_tutorial/test_query_params_str_validations/test_tutorial002.py

        response = client.get("/items/", params={"q": "q" * 51})
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
                    "type": "string_too_long",
                    "loc": ["query", "q"],
                    "msg": "String should have at most 50 characters",
                    "input": "q" * 51,
                    "ctx": {"max_length": 50},
                }
            ]
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_query_params_str_validations/test_tutorial003.py

        response = client.get("/items/", params={"q": "q" * 51})
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
                    "type": "string_too_long",
                    "loc": ["query", "q"],
                    "msg": "String should have at most 50 characters",
                    "input": "q" * 51,
                    "ctx": {"max_length": 50},
                }
            ]
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  3. tests/test_path.py

        response = client.get("/path/param-maxlength/foobar")
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
                    "type": "string_too_long",
                    "loc": ["path", "item_id"],
                    "msg": "String should have at most 3 characters",
                    "input": "foobar",
                    "ctx": {"max_length": 3},
                }
    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