Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for prop (0.19 sec)

  1. tests/test_tutorial/test_behind_a_proxy/test_tutorial003.py

                    ),
                    "description": "Staging environment",
                },
                {
                    "url": IsOneOf(
                        "https://prod.example.com/",
                        # TODO: remove when deprecating Pydantic v1
                        "https://prod.example.com",
                    ),
                    "description": "Production environment",
                },
            ],
            "paths": {
                "/app": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  2. docs_src/app_testing/app_b/test_main.py

        }
    
    
    def test_create_item_bad_token():
        response = client.post(
            "/items/",
            headers={"X-Token": "hailhydra"},
            json={"id": "bazz", "title": "Bazz", "description": "Drop the bazz"},
        )
        assert response.status_code == 400
        assert response.json() == {"detail": "Invalid X-Token header"}
    
    
    def test_create_existing_item():
        response = client.post(
            "/items/",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. tests/test_openapi_servers.py

                    "description": "Staging but actually localhost still",
                },
                {
                    "url": IsOneOf(
                        "https://prod.example.com/",
                        # TODO: remove when deprecating Pydantic v1
                        "https://prod.example.com",
                    )
                },
            ],
            "paths": {
                "/foo": {
                    "get": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2K bytes
    - Viewed (0)
  4. docs_src/app_testing/app_b_an/test_main.py

        }
    
    
    def test_create_item_bad_token():
        response = client.post(
            "/items/",
            headers={"X-Token": "hailhydra"},
            json={"id": "bazz", "title": "Bazz", "description": "Drop the bazz"},
        )
        assert response.status_code == 400
        assert response.json() == {"detail": "Invalid X-Token header"}
    
    
    def test_create_existing_item():
        response = client.post(
            "/items/",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_behind_a_proxy/test_tutorial004.py

                    ),
                    "description": "Staging environment",
                },
                {
                    "url": IsOneOf(
                        "https://prod.example.com/",
                        # TODO: remove when deprecating Pydantic v1
                        "https://prod.example.com",
                    ),
                    "description": "Production environment",
                },
            ],
            "paths": {
                "/app": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  6. docs_src/behind_a_proxy/tutorial003.py

    from fastapi import FastAPI, Request
    
    app = FastAPI(
        servers=[
            {"url": "https://stag.example.com", "description": "Staging environment"},
            {"url": "https://prod.example.com", "description": "Production environment"},
        ],
        root_path="/api/v1",
    )
    
    
    @app.get("/app")
    def read_main(request: Request):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 10 17:28:18 GMT 2020
    - 405 bytes
    - Viewed (0)
  7. docs_src/behind_a_proxy/tutorial004.py

    from fastapi import FastAPI, Request
    
    app = FastAPI(
        servers=[
            {"url": "https://stag.example.com", "description": "Staging environment"},
            {"url": "https://prod.example.com", "description": "Production environment"},
        ],
        root_path="/api/v1",
        root_path_in_servers=False,
    )
    
    
    @app.get("/app")
    def read_main(request: Request):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 10 17:28:18 GMT 2020
    - 437 bytes
    - Viewed (0)
  8. docs_src/app_testing/app_b_an_py39/test_main.py

        }
    
    
    def test_create_item_bad_token():
        response = client.post(
            "/items/",
            headers={"X-Token": "hailhydra"},
            json={"id": "bazz", "title": "Bazz", "description": "Drop the bazz"},
        )
        assert response.status_code == 400
        assert response.json() == {"detail": "Invalid X-Token header"}
    
    
    def test_create_existing_item():
        response = client.post(
            "/items/",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  9. docs_src/app_testing/app_b_py310/test_main.py

        }
    
    
    def test_create_item_bad_token():
        response = client.post(
            "/items/",
            headers={"X-Token": "hailhydra"},
            json={"id": "bazz", "title": "Bazz", "description": "Drop the bazz"},
        )
        assert response.status_code == 400
        assert response.json() == {"detail": "Invalid X-Token header"}
    
    
    def test_create_existing_item():
        response = client.post(
            "/items/",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_dataclasses/test_tutorial003.py

            "/authors/foo/items/",
            json=[{"name": "Bar"}, {"name": "Baz", "description": "Drop the Baz"}],
        )
        assert response.status_code == 200
        assert response.json() == {
            "name": "foo",
            "items": [
                {"name": "Bar", "description": None},
                {"name": "Baz", "description": "Drop the Baz"},
            ],
        }
    
    
    def test_get_authors():
        response = client.get("/authors/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 12.1K bytes
    - Viewed (0)
Back to top