Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 64 for Kersting (0.33 sec)

  1. tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py

    import importlib
    import os
    from pathlib import Path
    
    import pytest
    
    from ...utils import needs_py39, needs_pydanticv1
    
    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 822 bytes
    - Viewed (0)
  2. docs/en/data/external_links.yml

      - author: Michael Herman
        author_link: https://testdriven.io/authors/herman
        link: https://testdriven.io/blog/fastapi-crud/
        title: 'TestDriven.io: Developing and Testing an Asynchronous API with FastAPI and Pytest'
      - author: Bernard Brenyah
        author_link: https://medium.com/@bbrenyah
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 21 20:57:27 GMT 2024
    - 21.3K bytes
    - Viewed (2)
  3. docs/en/docs/how-to/sql-databases-peewee.md

    ```Python hl_lines="2"
    # Something goes here
    def read_users(skip: int = 0, limit: int = 100):
        # Something goes here
    ```
    
    ## Testing Peewee with async
    
    This example includes an extra *path operation* that simulates a long processing request with `time.sleep(sleep_time)`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (1)
  4. fastapi/applications.py

                    actual dependency that should be called.
    
                    This is for testing, to replace expensive dependencies with testing
                    versions.
    
                    Read more about it in the
                    [FastAPI docs for Testing Dependencies with Overrides](https://fastapi.tiangolo.com/advanced/testing-dependencies/).
                    """
                ),
            ] = {}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  5. docs/pt/docs/deployment/versions.md

    ## Atualizando as versões do FastAPI
    
    Você deve adicionar testes para a sua aplicação.
    
    Com **FastAPI** isso é muito fácil (graças a Starlette), verifique a documentação: [Testing](../tutorial/testing.md){.internal-link target=\_blank}
    
    Após a criação dos testes, você pode atualizar a sua versão do **FastAPI** para uma mais recente, execute os testes para se certificar de que todo o seu código está funcionando corretamente.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 29 20:14:40 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/settings.md

        ```Python hl_lines="16  18-20"
        {!> ../../../docs_src/settings/app02/main.py!}
        ```
    
    ### Settings and testing
    
    Then it would be very easy to provide a different settings object during testing by creating a dependency override for `get_settings`:
    
    ```Python hl_lines="9-10  13  21"
    {!../../../docs_src/settings/app02/test_main.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_testing/test_main_b_an_py310.py

    from ...utils import needs_py310
    
    
    @needs_py310
    def test_app():
        from docs_src.app_testing.app_b_an_py310 import test_main
    
        test_main.test_create_existing_item()
        test_main.test_create_item()
        test_main.test_create_item_bad_token()
        test_main.test_read_nonexistent_item()
        test_main.test_read_item()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 360 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_testing_dependencies/test_tutorial001_an.py

    from docs_src.dependency_testing.tutorial001_an import (
        app,
        client,
        test_override_in_items,
        test_override_in_items_with_params,
        test_override_in_items_with_q,
    )
    
    
    def test_override_in_items_run():
        test_override_in_items()
    
    
    def test_override_in_items_with_q_run():
        test_override_in_items_with_q()
    
    
    def test_override_in_items_with_params_run():
        test_override_in_items_with_params()
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  9. docs_src/settings/app02_an/test_main.py

    client = TestClient(app)
    
    
    def get_settings_override():
        return Settings(admin_email="testing******@****.***")
    
    
    app.dependency_overrides[get_settings] = get_settings_override
    
    
    def test_app():
        response = client.get("/info")
        data = response.json()
        assert data == {
            "app_name": "Awesome API",
            "admin_email": "testing******@****.***",
            "items_per_user": 50,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 515 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_testing/test_tutorial003.py

    import pytest
    
    
    def test_main():
        with pytest.warns(DeprecationWarning):
            from docs_src.app_testing.tutorial003 import test_read_items
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 167 bytes
    - Viewed (0)
Back to top