Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 104 for Fixture (0.05 seconds)

  1. build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/testfixtures/TestFixturesPlugin.java

                project.afterEvaluate(spec -> {
                    if (extension.fixtures.isEmpty()) {
                        // if only one fixture is used, that's this one, but without a compose file that's not a valid configuration
                        throw new IllegalStateException(
                            "No " + DOCKER_COMPOSE_YML + " found for " + project.getPath() + " nor does it use other fixtures."
                        );
                    }
                });
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Wed Sep 29 15:07:50 GMT 2021
    - 10.7K bytes
    - Click Count (0)
  2. scripts/tests/test_translation_fixer/conftest.py

            if item_path.is_relative_to(THIS_DIR):
                item.add_marker(skip_on_windows)
    
    
    @pytest.fixture(name="runner")
    def get_runner():
        runner = CliRunner()
        with runner.isolated_filesystem():
            yield runner
    
    
    @pytest.fixture(name="root_dir")
    def prepare_paths(runner):
        docs_dir = Path("docs")
        en_docs_dir = docs_dir / "en" / "docs"
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 25 10:37:59 GMT 2026
    - 1.3K bytes
    - Click Count (0)
  3. tests/test_file_and_form_order_issue_9116.py

        files: Annotated[list[bytes], File()],
    ):
        return {"file_contents": files, "city": city}
    
    
    client = TestClient(app)
    
    
    @pytest.fixture
    def tmp_file_1(tmp_path: Path) -> Path:
        f = tmp_path / "example1.txt"
        f.write_text("foo")
        return f
    
    
    @pytest.fixture
    def tmp_file_2(tmp_path: Path) -> Path:
        f = tmp_path / "example2.txt"
        f.write_text("bar")
        return f
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 2.3K bytes
    - Click Count (0)
  4. tests/test_security_scopes.py

    from typing import Annotated
    
    import pytest
    from fastapi import Depends, FastAPI, Security
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="call_counter")
    def call_counter_fixture():
        return {"count": 0}
    
    
    @pytest.fixture(name="app")
    def app_fixture(call_counter: dict[str, int]):
        def get_db():
            call_counter["count"] += 1
            return f"db_{call_counter['count']}"
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1006 bytes
    - Click Count (0)
  5. tests/test_security_scopes_sub_dependency.py

    from fastapi.security import SecurityScopes
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="call_counts")
    def call_counts_fixture():
        return {
            "get_db_session": 0,
            "get_current_user": 0,
            "get_user_me": 0,
            "get_user_items": 0,
        }
    
    
    @pytest.fixture(name="app")
    def app_fixture(call_counts: dict[str, int]):
        def get_db_session():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 2.9K bytes
    - Click Count (0)
  6. tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py

    
    @pytest.fixture(
        name="mod_name",
        params=[
            pytest.param("tutorial001_py310", marks=needs_py310),
            pytest.param("tutorial002_py310", marks=needs_py310),
            pytest.param("tutorial003_py310", marks=needs_py310),
        ],
    )
    def get_mod_name(request: pytest.FixtureRequest):
        return request.param
    
    
    @pytest.fixture(name="client")
    def get_client(mod_name: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 8.5K bytes
    - Click Count (0)
  7. tests/test_tutorial/test_additional_status_codes/test_tutorial001.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial001_py310", marks=needs_py310),
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.additional_status_codes.{request.param}")
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 934 bytes
    - Click Count (0)
  8. tests/test_tutorial/test_authentication_error_status_code/test_tutorial001.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    
    @pytest.fixture(
        name="client",
        params=[
            "tutorial001_an_py310",
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(
            f"docs_src.authentication_error_status_code.{request.param}"
        )
    
        client = TestClient(mod.app)
        return client
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 1.9K bytes
    - Click Count (0)
  9. tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial003_py310", marks=needs_py310),
            pytest.param("tutorial003_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  10. tests/test_schema_compat_pydantic_v2.py

    from dirty_equals import IsOneOf
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    from pydantic import BaseModel
    
    from tests.utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from enum import Enum
    
        app = FastAPI()
    
        class PlatformRole(str, Enum):
            admin = "admin"
            user = "user"
    
        class OtherRole(str, Enum): ...
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Mar 23 12:36:49 GMT 2026
    - 4.1K bytes
    - Click Count (0)
Back to Top