Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for testing (0.5 sec)

  1. tests/test_tutorial/test_sql_databases/test_testing_databases.py

    import importlib
    import os
    from pathlib import Path
    
    import pytest
    
    from ...utils import needs_pydanticv1
    
    
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs(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
            test_db.unlink()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 788 bytes
    - Viewed (0)
  2. 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)
  3. tests/test_tutorial/test_sql_databases/test_testing_databases_py310.py

    import importlib
    import os
    from pathlib import Path
    
    import pytest
    
    from ...utils import needs_py310, needs_pydanticv1
    
    
    @needs_py310
    # 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
    - 825 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_testing_dependencies/test_tutorial001_an_py39.py

    from ...utils import needs_py39
    
    
    @needs_py39
    def test_override_in_items_run():
        from docs_src.dependency_testing.tutorial001_an_py39 import test_override_in_items
    
        test_override_in_items()
    
    
    @needs_py39
    def test_override_in_items_with_q_run():
        from docs_src.dependency_testing.tutorial001_an_py39 import (
            test_override_in_items_with_q,
        )
    
        test_override_in_items_with_q()
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. tests/test_tutorial/test_testing_dependencies/test_tutorial001_py310.py

    from ...utils import needs_py310
    
    
    @needs_py310
    def test_override_in_items_run():
        from docs_src.dependency_testing.tutorial001_py310 import test_override_in_items
    
        test_override_in_items()
    
    
    @needs_py310
    def test_override_in_items_with_q_run():
        from docs_src.dependency_testing.tutorial001_py310 import (
            test_override_in_items_with_q,
        )
    
        test_override_in_items_with_q()
    
    
    @needs_py310
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_testing_dependencies/test_tutorial001_an_py310.py

    from ...utils import needs_py310
    
    
    @needs_py310
    def test_override_in_items_run():
        from docs_src.dependency_testing.tutorial001_an_py310 import test_override_in_items
    
        test_override_in_items()
    
    
    @needs_py310
    def test_override_in_items_with_q_run():
        from docs_src.dependency_testing.tutorial001_an_py310 import (
            test_override_in_items_with_q,
        )
    
        test_override_in_items_with_q()
    
    
    @needs_py310
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2K bytes
    - Viewed (0)
  9. tests/test_datastructures.py

    def test_upload_file_is_closed(tmp_path: Path):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
        app = FastAPI()
    
        testing_file_store: List[UploadFile] = []
    
        @app.post("/uploadfile/")
        def create_upload_file(file: UploadFile):
            testing_file_store.append(file)
            return {"filename": file.filename}
    
        client = TestClient(app)
        with path.open("rb") as file:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 2K bytes
    - Viewed (0)
  10. docs_src/settings/app02_an_py39/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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 515 bytes
    - Viewed (0)
Back to top