Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 536 for texts (0.15 sec)

  1. docs/en/docs/advanced/testing-database.md

    In this example we'll create a temporary database only for the tests.
    
    ## File structure
    
    We create a new file at `sql_app/tests/test_sql_app.py`.
    
    So the new file structure looks like:
    
    ``` hl_lines="9-11"
    .
    └── sql_app
        ├── __init__.py
        ├── crud.py
        ├── database.py
        ├── main.py
        ├── models.py
        ├── schemas.py
        └── tests
            ├── __init__.py
            └── test_sql_app.py
    ```
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  2. docs/en/docs/contributing.md

    And those Python files are included/injected in the documentation when generating the site.
    
    ### Docs for tests
    
    Most of the tests actually run against the example source files in the documentation.
    
    This helps to make sure that:
    
    * The documentation is up-to-date.
    * The documentation examples can be run as is.
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 17:42:43 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_websockets/test_tutorial002_py310.py

                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: some-token"
                data = websocket.receive_text()
                assert data == f"Message text was: {message}, for item ID: bar"
                message = "Message two"
                websocket.send_text(message)
                data = websocket.receive_text()
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. 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 Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. 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 Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Nov 05 20:50:37 GMT 2020
    - 3.3K bytes
    - Viewed (0)
  6. .github/workflows/test.yml

              key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt', 'requirements-docs-tests.txt') }}-test-v08
          - 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
    Others
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.4K bytes
    - Viewed (1)
  7. docs_src/websockets/tutorial002_an_py310.py

    ):
        await websocket.accept()
        while True:
            data = await websocket.receive_text()
            await websocket.send_text(
                f"Session cookie or query token value is: {cookie_or_token}"
            )
            if q is not None:
                await websocket.send_text(f"Query parameter q is: {q}")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  8. docs/fr/docs/deployment/versions.md

    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.
    
    Si tout fonctionne, ou après avoir fait les changements nécessaires, et que tous vos tests passent, vous pouvez
    épingler votre version de `fastapi` à cette nouvelle version récente.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Oct 31 17:39:54 GMT 2022
    - 4K bytes
    - Viewed (0)
  9. tests/test_ws_dependencies.py

    async def index(websocket: WebSocket, deps: DepList):
        await websocket.accept()
        await websocket.send_text(json.dumps(deps))
        await websocket.close()
    
    
    @router.websocket("/router", dependencies=[create_dependency("routerindex")])
    async def routerindex(websocket: WebSocket, deps: DepList):
        await websocket.accept()
        await websocket.send_text(json.dumps(deps))
        await websocket.close()
    
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Jun 11 20:35:39 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  10. scripts/lint.sh

    #!/usr/bin/env bash
    
    set -e
    set -x
    
    mypy fastapi
    ruff fastapi tests docs_src scripts
    Shell Script
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 119 bytes
    - Viewed (0)
Back to top