Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for noises (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. docs/fr/docs/history-design-future.md

    Par exemple, il était clair que l'idéal était de se baser sur les annotations de type Python standard.
    
    De plus, la meilleure approche était d'utiliser des normes déjà existantes.
    
    Ainsi, avant même de commencer à coder **FastAPI**, j'ai passé plusieurs mois à étudier les spécifications d'OpenAPI, JSON Schema, OAuth2, etc. Comprendre leurs relations, leurs similarités et leurs différences.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. docs/en/docs/release-notes.md

    ## 0.49.2
    
    * Fix links in release notes. PR [#1052](https://github.com/tiangolo/fastapi/pull/1052) by [@sattosan](https://github.com/sattosan).
    * Fix typo in release notes. PR [#1051](https://github.com/tiangolo/fastapi/pull/1051) by [@sattosan](https://github.com/sattosan).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  7. docs/pt/docs/async.md

    ```Python
    burgers = await get_burgers(2)
    ```
    
    A chave aqui é o `await`. Ele diz ao Python que ele tem que esperar por `get_burgers(2)` para finalizar suas coisas antes de armazenar os resultados em `burgers`. Com isso, o Python saberá que ele pode ir e fazer outras coisas nesse meio tempo (como receber outra requisição).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 22.2K bytes
    - Viewed (0)
  8. docs/pt/docs/contributing.md

    Se você precisar fazer isso, edite o `mkdocs.yml` para sua nova linguagem, teremos algo como:
    
    ```YAML hl_lines="5"
    site_name: FastAPI
    # Mais coisas
    theme:
      # Mais coisas
      language: xx
    ```
    
    Altere essa linguagem de `xx` (do seu código de linguagem) para `en`.
    
    Então você poderá iniciar novamente o _servidor ao vivo_.
    
    #### Pré-visualize o resultado
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jun 11 21:38:15 GMT 2023
    - 14.9K bytes
    - Viewed (0)
  9. docs/pt/docs/advanced/events.md

    !!! tip "Dica"
        Perceba que nesse caso nós estamos usando a função padrão do Python `open()` que interage com um arquivo.
    
        Então, isso envolve I/O (input/output), que exige "esperar" que coisas sejam escritas em disco.
    
        Mas `open()` não usa `async` e `await`.
    
        Então, nós declaramos uma função de manipulação de evento com o padrão `def` ao invés de `async def`.
    
    ### `startup` e `shutdown` juntos
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  10. docs/pt/docs/deployment.md

    Agora, pela perspectiva de um desenvolvedor, aqui estão algumas coisas para se ter em mente enquanto se pensa sobre HTTPS:
    
    * Para HTTPS, o servidor precisa ter "certificados" gerados por terceiros.
        * Esses certificados são na verdade adquiridos por terceiros, não "gerados".
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Aug 18 16:16:54 GMT 2022
    - 16.8K bytes
    - Viewed (0)
Back to top