Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 566 for testis (0.17 sec)

  1. docs/en/docs/tutorial/testing.md

    !!! tip
        If you want to call `async` functions in your tests apart from sending requests to your FastAPI application (e.g. asynchronous database functions), have a look at the [Async Tests](../advanced/async-tests.md){.internal-link target=_blank} in the advanced tutorial.
    
    ## Separating tests
    
    In a real application, you probably would have your tests in a different file.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/testing-database.md

    You could want to set up a different database for testing, rollback the data after the tests, pre-fill it with some testing data, etc.
    
    The main idea is exactly the same you saw in that previous chapter.
    
    ## Add tests for the SQL app
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  3. .github/workflows/test.yml

          - name: Install Dependencies
            if: steps.cache.outputs.cache-hit != 'true'
            run: pip install -r requirements-tests.txt
          - name: Install Pydantic v2
            run: pip install "pydantic>=2.0.2,<3.0.0"
          - name: Lint
            run: bash scripts/lint.sh
    
      test:
        runs-on: ubuntu-latest
        strategy:
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.4K bytes
    - Viewed (1)
  4. docs/en/docs/advanced/testing-events.md

    # Testing Events: startup - shutdown
    
    When you need your event handlers (`startup` and `shutdown`) to run in your tests, you can use the `TestClient` with a `with` statement:
    
    ```Python hl_lines="9-12  20-24"
    {!../../../docs_src/app_testing/tutorial003.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 262 bytes
    - Viewed (0)
  5. docs/pt/docs/project-generation.md

    * Testes _backend_ _REST_ baseados no **Pytest**, integrados com Docker, então você pode testar a interação completa da API, independente do banco de dados. Como roda no Docker, ele pode construir um novo repositório de dados do zero toda vez (assim você pode usar ElasticSearch, MongoDB, CouchDB, ou o que quiser, e apenas testar que a API esteja funcionando).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Oct 17 05:50:32 GMT 2020
    - 6.3K bytes
    - Viewed (0)
  6. docs/en/docs/deployment/versions.md

    ## Upgrading the FastAPI versions
    
    You should add tests for your app.
    
    With **FastAPI** it's very easy (thanks to Starlette), check the docs: [Testing](../tutorial/testing.md){.internal-link target=_blank}
    
    After you have tests, then you can upgrade the **FastAPI** version to a more recent one, and make sure that all your code is working correctly by running your tests.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Nov 05 20:50:37 GMT 2020
    - 3.3K bytes
    - Viewed (0)
  7. docs/fr/docs/deployment/versions.md

    ## Mise à jour des versions FastAPI
    
    Vous devriez tester votre application.
    
    Avec **FastAPI** c'est très facile (merci à Starlette), consultez la documentation : [Testing](../tutorial/testing.md){.internal-link target=_blank}
    
    Après avoir effectué des tests, vous pouvez mettre à jour la version **FastAPI** vers une version plus récente, et vous assurer que tout votre code fonctionne correctement en exécutant vos tests.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Oct 31 17:39:54 GMT 2022
    - 4K bytes
    - Viewed (0)
  8. scripts/lint.sh

    #!/usr/bin/env bash
    
    set -e
    set -x
    
    mypy fastapi
    ruff check fastapi tests docs_src scripts
    Shell Script
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 30 00:03:14 GMT 2024
    - 125 bytes
    - Viewed (0)
  9. docs/en/docs/advanced/testing-websockets.md

    # Testing WebSockets
    
    You can use the same `TestClient` to test WebSockets.
    
    For this, you use the `TestClient` in a `with` statement, connecting to the WebSocket:
    
    ```Python hl_lines="27-31"
    {!../../../docs_src/app_testing/tutorial002.py!}
    ```
    
    !!! note
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 449 bytes
    - Viewed (0)
  10. docs/zh/docs/advanced/testing-events.md

    # 测试事件:启动 - 关闭
    
    使用 `TestClient` 和 `with` 语句,在测试中运行事件处理器(`startup` 与 `shutdown`)。
    
    ```Python hl_lines="9-12  20-24"
    {!../../../docs_src/app_testing/tutorial003.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jan 28 18:21:02 GMT 2024
    - 228 bytes
    - Viewed (0)
Back to top