Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 307 for erroa (0.57 sec)

  1. tests/test_multipart_installation.py

    from fastapi.dependencies.utils import (
        multipart_incorrect_install_error,
        multipart_not_installed_error,
    )
    
    
    def test_incorrect_multipart_installed_form(monkeypatch):
        monkeypatch.delattr("multipart.multipart.parse_options_header", raising=False)
        with pytest.raises(RuntimeError, match=multipart_incorrect_install_error):
            app = FastAPI()
    
            @app.post("/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  2. fastapi/security/api_key.py

                    """
                ),
            ] = None,
            auto_error: Annotated[
                bool,
                Doc(
                    """
                    By default, if the query parameter is not provided, `APIKeyQuery` will
                    automatically cancel the request and send the client an error.
    
                    If `auto_error` is set to `False`, when the query parameter is not
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

                        "loc": ["body", "file"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "fileb"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "token"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  4. tests/test_multi_body_errors.py

                        "loc": ["body", 0, "name"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", 0, "age"],
                        "msg": "value is not a valid decimal",
                        "type": "type_error.decimal",
                    },
                    {
                        "loc": ["body", 1, "name"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  5. tests/test_annotated.py

            )
            # TODO: remove when deprecating Pydantic v1
            | IsDict(
                {
                    "loc": ["query", "foo"],
                    "msg": "field required",
                    "type": "value_error.missing",
                }
            )
        ]
    }
    foo_is_short = {
        "detail": [
            IsDict(
                {
                    "ctx": {"min_length": 1},
                    "loc": ["query", "foo"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_handling_errors/test_tutorial004.py

    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial004 import app
    
    client = TestClient(app)
    
    
    def test_get_validation_error():
        response = client.get("/items/foo")
        assert response.status_code == 400, response.text
        # TODO: remove when deprecating Pydantic v1
        assert (
            # TODO: remove when deprecating Pydantic v1
            "path -> item_id" in response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  7. tests/test_multi_query_errors.py

                        "msg": "value is not a valid integer",
                        "type": "type_error.integer",
                    },
                    {
                        "loc": ["query", "q", 1],
                        "msg": "value is not a valid integer",
                        "type": "type_error.integer",
                    },
                ]
            }
        )
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  8. tests/test_dependency_duplicates.py

            {
                "detail": [
                    {
                        "loc": ["body", "item2"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    }
                ]
            }
        )
    
    
    def test_no_duplicates():
        response = client.post(
            "/no-duplicates",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_files/test_tutorial001_an.py

            {
                "detail": [
                    {
                        "loc": ["body", "file"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    }
                ]
            }
        )
    
    
    def test_post_body_json():
        response = client.post("/files/", json={"file": "Foo"})
        assert response.status_code == 422, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  10. fastapi/dependencies/utils.py

                    assert parse_options_header
                except ImportError:
                    logger.error(multipart_incorrect_install_error)
                    raise RuntimeError(multipart_incorrect_install_error) from None
            except ImportError:
                logger.error(multipart_not_installed_error)
                raise RuntimeError(multipart_not_installed_error) from None
    
    
    def get_param_sub_dependant(
        *,
        param_name: str,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
Back to top