Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 314 for error (0.16 sec)

  1. tests/test_additional_responses_custom_validationerror.py

    
    class JsonApiResponse(JSONResponse):
        media_type = "application/vnd.api+json"
    
    
    class Error(BaseModel):
        status: str
        title: str
    
    
    class JsonApiError(BaseModel):
        errors: typing.List[Error]
    
    
    @app.get(
        "/a/{id}",
        response_class=JsonApiResponse,
        responses={422: {"description": "Error", "model": JsonApiError}},
    )
    async def a(id):
        pass  # pragma: no cover
    
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  2. docs/sts/client_grants/sts_element.py

            :param data: string data to be parsed.
            :return: Returns an STSElement.
            """
            try:
                return cls(root_name, cElementTree.fromstring(data))
            except _ETREE_EXCEPTIONS as error:
                raise InvalidXMLError(
                    '"{}" XML is not parsable. Message: {}'.format(
                        root_name, error.message
                    )
                )
    Python
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_handling_errors/test_tutorial002.py

        assert response.headers.get("x-error") == "There goes my error"
        assert response.json() == {"detail": "Item not found"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items-header/{item_id}": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an.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 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  5. tests/test_application.py

                                "content": {"application/json": {"schema": {}}},
                            },
                            "422": {
                                "description": "Validation Error",
                                "content": {
                                    "application/json": {
                                        "schema": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 52.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_forms/test_tutorial001.py

                        "loc": ["body", "username"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "password"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    def test_post_body_json(client: TestClient):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

                        "loc": ["body", "item"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "user"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "importance"],
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an.py

                        "loc": ["body", "item"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "user"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "importance"],
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_body_multiple_params/test_tutorial003_py310.py

                        "loc": ["body", "item"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "user"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", "importance"],
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  10. tests/test_ws_router.py

                pass  # pragma: no cover
        # the validation error does produce a close message
        assert e.value.code == status.WS_1008_POLICY_VIOLATION
        # and no error is leaked
        assert caught == []
    
    
    def test_depend_err_middleware():
        """
        Verify that it is possible to write custom WebSocket middleware to catch errors
        """
    
        @websocket_middleware
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
Back to top