aboutsummaryrefslogtreecommitdiff
path: root/test_utils/models/contest
diff options
context:
space:
mode:
authorMax Nanis2026-08-28 00:22:17 -0700
committerMax Nanis2026-08-28 00:22:17 -0700
commitba544e2ba31432aad4d2acaba3e1f90c27137ded (patch)
treeec04289750280c2cba02216ccc6cd6a5d7695225 /test_utils/models/contest
parentaeeb7fef2594ccd34fbe96a77f6c5b392299fed7 (diff)
downloadgeneralresearch-ba544e2ba31432aad4d2acaba3e1f90c27137ded.tar.gz
generalresearch-ba544e2ba31432aad4d2acaba3e1f90c27137ded.zip
Ruff evening!
Diffstat (limited to 'test_utils/models/contest')
-rw-r--r--test_utils/models/contest/conftest.py37
1 files changed, 20 insertions, 17 deletions
diff --git a/test_utils/models/contest/conftest.py b/test_utils/models/contest/conftest.py
index d9c8a6b..84930b8 100644
--- a/test_utils/models/contest/conftest.py
+++ b/test_utils/models/contest/conftest.py
@@ -38,6 +38,26 @@ from generalresearch.models.thl.user import User
# === Managers ===
+# --- Factories ---
+
+
+@pytest.fixture(scope="function")
+def raffle_contest_factory(
+ product_user_wallet_yes: Product,
+ raffle_contest_create: RaffleContestCreate,
+ contest_manager: ContestManager,
+) -> Callable[..., RaffleContest]:
+
+ def _inner(**kwargs):
+ raffle_contest_create.update(**kwargs)
+ return contest_manager.create(
+ product_id=product_user_wallet_yes.uuid,
+ contest_create=raffle_contest_create,
+ )
+
+ return _inner
+
+
# === Models ===
@@ -82,23 +102,6 @@ def raffle_contest(
)
-@pytest.fixture(scope="function")
-def raffle_contest_factory(
- product_user_wallet_yes: Product,
- raffle_contest_create: RaffleContestCreate,
- contest_manager: ContestManager,
-) -> Callable[..., RaffleContest]:
-
- def _inner(**kwargs):
- raffle_contest_create.update(**kwargs)
- return contest_manager.create(
- product_id=product_user_wallet_yes.uuid,
- contest_create=raffle_contest_create,
- )
-
- return _inner
-
-
@pytest.fixture
def milestone_contest_create() -> MilestoneContestCreate:
from generalresearch.models.thl.contest import (