Skip to content

Commit

Permalink
Issue #112 eliminate config fixture from conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Mar 1, 2024
1 parent 915bb2f commit ef0c933
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
23 changes: 0 additions & 23 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
AggregatorCollectionCatalog,
MultiBackendConnection,
)
from openeo_aggregator.config import AggregatorConfig
from openeo_aggregator.testing import (
DummyKazooClient,
MetadataBuilder,
Expand Down Expand Up @@ -66,19 +65,6 @@ def zk_client() -> DummyKazooClient:
return DummyKazooClient()




@pytest.fixture
def base_config(zk_client) -> AggregatorConfig:
"""Base config for tests (without any configured backends)."""
conf = AggregatorConfig()
conf.config_source = "test fixture base_config"
# conf.flask_error_handling = False # Temporary disable flask error handlers to simplify debugging (better stack traces).


return conf


@pytest.fixture
def backend1_id() -> str:
"""Id of first upstream backend. As a fixture to allow per-test override"""
Expand All @@ -91,15 +77,6 @@ def backend2_id() -> str:
return "b2"


@pytest.fixture
def config(
base_config, backend1, backend2, backend1_id, backend2_id
) -> AggregatorConfig:
"""Config for most tests with two backends."""
conf = base_config
return conf


@pytest.fixture
def multi_backend_connection(backend1, backend2) -> MultiBackendConnection:
return MultiBackendConnection.from_config()
Expand Down
1 change: 0 additions & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import pytest

from openeo_aggregator.app import create_app
from openeo_aggregator.config import AggregatorConfig
from openeo_aggregator.testing import config_overrides

from .conftest import get_api100, get_flask_app
Expand Down

0 comments on commit ef0c933

Please sign in to comment.