Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for test_invalid_sequence (0.34 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_invalid_sequence_param.py

    import pytest
    from fastapi import FastAPI, Query
    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(
            AssertionError,
            match="Query parameter 'q' must be one of the supported types",
        ):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: list[Item] = Query(default=None)):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 1.5K bytes
    - Click Count (0)
  2. tests/test_invalid_path_param.py

    import pytest
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/{id}")
            def read_items(id: list[Item]):
                pass  # pragma: no cover
    
    
    def test_invalid_tuple():
        with pytest.raises(AssertionError):
            app = FastAPI()
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1.6K bytes
    - Click Count (0)
Back to Top