Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for test_invalid_dict (0.21 sec)

  1. tests/test_invalid_sequence_param.py

            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: Tuple[Item, Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    def test_invalid_dict():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  2. tests/test_invalid_path_param.py

            class Item(BaseModel):
                title: str
    
            @app.get("/items/{id}")
            def read_items(id: Tuple[Item, Item]):
                pass  # pragma: no cover
    
    
    def test_invalid_dict():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/{id}")
            def read_items(id: Dict[str, Item]):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Jun 03 17:59:40 GMT 2019
    - 1.7K bytes
    - Viewed (0)
Back to top