Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for py_test (0.15 sec)

  1. tests/test_annotated.py

    import pytest
    from dirty_equals import IsDict
    from fastapi import APIRouter, FastAPI, Query
    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/default")
    async def default(foo: Annotated[str, Query()] = "foo"):
        return {"foo": foo}
    
    
    @app.get("/required")
    async def required(foo: Annotated[str, Query(min_length=1)]):
        return {"foo": foo}
    
    
    @app.get("/multiple")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
Back to top