Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeifer committed Nov 1, 2024
1 parent fba52ed commit 1bde9f5
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections.abc import Iterator
from datetime import UTC, datetime, timedelta, timezone
from typing import Callable, List
from typing import Callable
from urllib.parse import urljoin
from uuid import uuid4

Expand Down Expand Up @@ -40,7 +40,7 @@ def product_backend(order_db: MockOrderDB) -> MockProductBackend:


@pytest.fixture
def root_backend(order_db) -> MockRootBackend:
def root_backend(order_db: MockOrderDB) -> MockRootBackend:
return MockRootBackend(order_db)


Expand Down Expand Up @@ -87,24 +87,10 @@ def url_for(value: str) -> str:


@pytest.fixture
def products(mock_product_test_spotlight) -> list[Product]:
def products(mock_product_test_spotlight: Product) -> list[Product]:
return [mock_product_test_spotlight]


@pytest.fixture
def opportunities(products: list[Product]) -> list[Opportunity]:
return [
Opportunity(
geometry=Point(type="Point", coordinates=[13.4, 52.5]),
properties={
"product_id": products[0].id,
"datetime": (datetime.now(UTC), datetime.now(UTC)),
"filter": {},
},
)
]


@pytest.fixture
def mock_provider() -> Provider:
return Provider(
Expand All @@ -116,7 +102,7 @@ def mock_provider() -> Provider:


@pytest.fixture
def mock_test_spotlight_opportunities() -> List[Opportunity]:
def mock_test_spotlight_opportunities() -> list[Opportunity]:
"""Fixture to create mock data for Opportunities for `test-spotlight-1`."""
now = datetime.now(timezone.utc) # Use timezone-aware datetime
start = now
Expand Down

0 comments on commit 1bde9f5

Please sign in to comment.