Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for Pauses (0.29 sec)

  1. tests/test_validate_response.py

            {"name": "baz", "price": "baz"},
        ]
    
    
    client = TestClient(app)
    
    
    def test_invalid():
        with pytest.raises(ResponseValidationError):
            client.get("/items/invalid")
    
    
    def test_invalid_none():
        with pytest.raises(ResponseValidationError):
            client.get("/items/invalidnone")
    
    
    def test_valid_none_data():
        response = client.get("/items/validnone")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_websockets/test_tutorial002_py310.py

        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    @needs_py310
    def test_websocket_invalid_data(app: FastAPI):
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_dependencies/test_tutorial008d_an.py

        assert response.json() == "plumbus"
    
    
    def test_internal_error(client: TestClient):
        from docs_src.dependencies.tutorial008d_an import InternalError
    
        with pytest.raises(InternalError) as exc_info:
            client.get("/items/portal-gun")
        assert (
            exc_info.value.args[0] == "The portal gun is too dangerous to be owned by Rick"
        )
    
    
    def test_internal_server_error():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/middleware.md

    * It takes each **request** that comes to your application.
    * It can then do something to that **request** or run any needed code.
    * Then it passes the **request** to be processed by the rest of the application (by some *path operation*).
    * It then takes the **response** generated by the application (by some *path operation*).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  5. docs/fr/docs/project-generation.md

    * Serveur web Python **prêt au déploiement** utilisant Uvicorn et Gunicorn.
    * Backend Python <a href="https://github.com/tiangolo/fastapi" class="external-link" target="_blank">**FastAPI**</a> :
        * **Rapide** : Très hautes performances, comparables à **NodeJS** ou **Go** (grâce à Starlette et Pydantic).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 02 14:18:06 GMT 2021
    - 6.7K bytes
    - Viewed (0)
  6. fastapi/utils.py

        field_info: Optional[FieldInfo] = None,
        alias: Optional[str] = None,
        mode: Literal["validation", "serialization"] = "validation",
    ) -> ModelField:
        """
        Create a new response field. Raises if type_ is invalid.
        """
        class_validators = class_validators or {}
        if PYDANTIC_V2:
            field_info = field_info or FieldInfo(
                annotation=type_, default=default, alias=alias
            )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  7. docs/fr/docs/tutorial/path-params.md

    Donc, l'URL pour ce fichier pourrait être : `/files/home/johndoe/myfile.txt`.
    
    ### Support d'OpenAPI
    
    OpenAPI ne supporte pas de manière de déclarer un paramètre de chemin contenant un *chemin*, cela pouvant causer des scénarios difficiles à tester et définir.
    
    Néanmoins, cela reste faisable dans **FastAPI**, via les outils internes de Starlette.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10K bytes
    - Viewed (0)
  8. tests/test_invalid_path_param.py

    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()
    
            class Item(BaseModel):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jun 03 17:59:40 GMT 2019
    - 1.7K bytes
    - Viewed (0)
  9. tests/test_invalid_sequence_param.py

    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: List[Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    def test_invalid_tuple():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_websockets/test_tutorial002.py

        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    def test_websocket_invalid_data():
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 3.6K bytes
    - Viewed (0)
Back to top