aboutsummaryrefslogtreecommitdiff
path: root/tests/managers/thl
diff options
context:
space:
mode:
authorstuppie2026-09-07 09:57:06 -0600
committerstuppie2026-09-07 09:57:06 -0600
commit967eb761c414e22c7567d0f594ae7a7bc6e3e62c (patch)
tree400e69cc1592713a53ab6b2e086749785b096d95 /tests/managers/thl
parentb07720826af57f056aec3818a3646bb296a24bfd (diff)
downloadgeneralresearch-967eb761c414e22c7567d0f594ae7a7bc6e3e62c.tar.gz
generalresearch-967eb761c414e22c7567d0f594ae7a7bc6e3e62c.zip
Leaderboard name and id are optional b/c they get set by validator. can't init the class otherwise. Fix tests. test_leaderboard_manager datetime is not supposed to have a timzeone; that is the point of the test
Diffstat (limited to 'tests/managers/thl')
-rw-r--r--tests/managers/thl/test_category.py4
-rw-r--r--tests/managers/thl/test_contest/test_leaderboard.py12
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/managers/thl/test_category.py b/tests/managers/thl/test_category.py
index 4d00643..a2805bc 100644
--- a/tests/managers/thl/test_category.py
+++ b/tests/managers/thl/test_category.py
@@ -15,7 +15,7 @@ if TYPE_CHECKING:
class TestCategory:
@pytest.fixture
- def beauty_fitness(self, thl_web_rw: PostgresConfig) -> Category:
+ def beauty_fitness(self) -> Category:
return Category(
uuid="12c1e96be82c4642a07a12a90ce6f59e",
@@ -41,7 +41,7 @@ class TestCategory:
uuid="aacff523c8e246888215611ec3b823c0",
adwords_vertical_id="235",
label="Hair Loss",
- path=f"{hair_care}/Hair Loss",
+ path=f"{hair_care.path}/Hair Loss",
)
@pytest.fixture
diff --git a/tests/managers/thl/test_contest/test_leaderboard.py b/tests/managers/thl/test_contest/test_leaderboard.py
index d80d512..9fd4428 100644
--- a/tests/managers/thl/test_contest/test_leaderboard.py
+++ b/tests/managers/thl/test_contest/test_leaderboard.py
@@ -29,13 +29,13 @@ class TestLeaderboardContestCRUD:
def test_create(
self,
- contest_create: LeaderboardContestCreate,
+ leaderboard_contest_create: LeaderboardContestCreate,
product_user_wallet_yes: Product,
thl_ledger_manager: ThlLedgerManager,
contest_manager: ContestManager,
):
c = contest_manager.create(
- product_id=product_user_wallet_yes.uuid, contest_create=contest_create
+ product_id=product_user_wallet_yes.uuid, contest_create=leaderboard_contest_create
)
c_out = contest_manager.get(c.uuid)
assert c == c_out
@@ -51,13 +51,13 @@ class TestLeaderboardContestCRUD:
def test_enter(
self,
user_with_wallet: User,
- contest_in_db: LeaderboardContest,
+ leaderboard_contest_in_db: LeaderboardContest,
thl_ledger_manager: ThlLedgerManager,
contest_manager: ContestManager,
user_manager: UserManager,
thl_redis: RedisConfig,
):
- contest = contest_in_db
+ contest = leaderboard_contest_in_db
user = user_with_wallet
c: LeaderboardContest = contest_manager.get(contest_uuid=contest.uuid)
@@ -84,14 +84,14 @@ class TestLeaderboardContestCRUD:
def test_contest_ends(
self,
user_with_wallet: User,
- contest_in_db: LeaderboardContest,
+ leaderboard_contest_in_db: LeaderboardContest,
thl_ledger_manager: ThlLedgerManager,
contest_manager: ContestManager,
user_manager: UserManager,
thl_redis: RedisConfig,
):
# The contest should be over. We need to trigger it.
- contest = contest_in_db
+ contest = leaderboard_contest_in_db
contest._redis_client = thl_redis
contest._user_manager = user_manager
user = user_with_wallet