Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Barnes (0.3 sec)

  1. tests/test_regex_deprecated_body.py

    from fastapi import FastAPI, Form
    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    from .utils import needs_py310
    
    
    def get_client():
        app = FastAPI()
        with pytest.warns(DeprecationWarning):
    
            @app.post("/items/")
            async def read_items(
                q: Annotated[str | None, Form(regex="^fixedquery$")] = None,
            ):
                if q:
                    return f"Hello {q}"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. tests/test_regex_deprecated_params.py

    from fastapi import FastAPI, Query
    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    from .utils import needs_py310
    
    
    def get_client():
        app = FastAPI()
        with pytest.warns(DeprecationWarning):
    
            @app.get("/items/")
            async def read_items(
                q: Annotated[str | None, Query(regex="^fixedquery$")] = None,
            ):
                if q:
                    return f"Hello {q}"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 5.5K bytes
    - Viewed (0)
Back to top