Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 263 for 422 (0.14 sec)

  1. tests/test_dependency_duplicates.py

    ):
        return [item, sub_items]
    
    
    def test_no_duplicates_invalid():
        response = client.post("/no-duplicates", json={"item": {"data": "myitem"}})
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "item2"],
    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)
  2. tests/test_tutorial/test_request_files/test_tutorial001_an.py

    from docs_src.request_files.tutorial001_an import app
    
    client = TestClient(app)
    
    
    def test_post_form_no_body():
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "file"],
    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)
  3. fastapi/exception_handlers.py

    from fastapi.websockets import WebSocket
    from starlette.exceptions import HTTPException
    from starlette.requests import Request
    from starlette.responses import JSONResponse, Response
    from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY, WS_1008_POLICY_VIOLATION
    
    
    async def http_exception_handler(request: Request, exc: HTTPException) -> Response:
        headers = getattr(exc, "headers", None)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body/test_tutorial001_py310.py

            "tax": 0.3,
        }
    
    
    @needs_py310
    def test_post_with_only_name(client: TestClient):
        response = client.post("/items/", json={"name": "Foo"})
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "price"],
                        "msg": "Field required",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (1)
  5. tests/test_tutorial/test_body/test_tutorial001.py

            "description": "Some Foo",
            "tax": 0.3,
        }
    
    
    def test_post_with_only_name(client: TestClient):
        response = client.post("/items/", json={"name": "Foo"})
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "price"],
                        "msg": "Field required",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (5)
  6. tests/test_extra_routes.py

                            "200": {
                                "description": "Successful Response",
                                "content": {"application/json": {"schema": {}}},
                            },
                            "422": {
                                "description": "Validation Error",
                                "content": {
                                    "application/json": {
                                        "schema": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_body_updates/test_tutorial001.py

                                        "schema": {"$ref": "#/components/schemas/Item"}
                                    }
                                },
                            },
                            "422": {
                                "description": "Validation Error",
                                "content": {
                                    "application/json": {
                                        "schema": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_updates/test_tutorial001_py310.py

                                        "schema": {"$ref": "#/components/schemas/Item"}
                                    }
                                },
                            },
                            "422": {
                                "description": "Validation Error",
                                "content": {
                                    "application/json": {
                                        "schema": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  9. tests/test_security_oauth2.py

        assert response.status_code == 403, response.text
        assert response.json() == {"detail": "Not authenticated"}
    
    
    def test_strict_login_no_data():
        response = client.post("/login")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "grant_type"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_files/test_tutorial002.py

    from docs_src.request_files.tutorial002 import app
    
    client = TestClient(app)
    
    
    def test_post_form_no_body():
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "files"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.5K bytes
    - Viewed (0)
Back to top