diff options
| author | stuppie | 2026-09-07 10:43:20 -0600 |
|---|---|---|
| committer | stuppie | 2026-09-07 10:43:20 -0600 |
| commit | 9002e4ea94ce790210ce42f4950a9e63ee8ca27b (patch) | |
| tree | 79e1390f94ab0f883ab31c96cd15ed04aaaf33f4 /tests/managers/thl/test_user_streak.py | |
| parent | c25a7351eeb6be4a998348a8cfc96bc4f965b96c (diff) | |
| download | generalresearch-9002e4ea94ce790210ce42f4950a9e63ee8ca27b.tar.gz generalresearch-9002e4ea94ce790210ce42f4950a9e63ee8ca27b.zip | |
fix more tests
Diffstat (limited to 'tests/managers/thl/test_user_streak.py')
| -rw-r--r-- | tests/managers/thl/test_user_streak.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/managers/thl/test_user_streak.py b/tests/managers/thl/test_user_streak.py index 59dee2d..d99b2b8 100644 --- a/tests/managers/thl/test_user_streak.py +++ b/tests/managers/thl/test_user_streak.py @@ -112,10 +112,8 @@ def create_session_fail( session_manager: SessionManager, start: datetime, user: User, - session_factory: Callable[..., Session], - wall_factory: Callable[..., Wall], ): - session = session_factory(started=start, country_iso="us", user=user) + session = session_manager.create(started=start, country_iso="us", user=user) session_manager.finish_with_status( session, finished=start + timedelta(minutes=1), @@ -128,10 +126,8 @@ def create_session_complete( session_manager: SessionManager, start: datetime, user: User, - session_factory: Callable[..., Session], - wall_factory: Callable[..., Wall], ): - session = session_factory(started=start, country_iso="us", user=user) + session = session_manager.create(started=start, country_iso="us", user=user) session_manager.finish_with_status( session, finished=start + timedelta(minutes=1), @@ -153,7 +149,7 @@ def test_user_streaks_active_broken( user: User, session_manager: SessionManager, broken_active_streak: list[UserStreak], - session_factory: Callable[..., Session], + bare_session_factory: Callable[..., Session], wall_factory: Callable[..., Wall], ): # Testing active streak, but broken (not today or yesterday) @@ -161,7 +157,7 @@ def test_user_streaks_active_broken( end1 = start1 + timedelta(minutes=1) # abandon counts as inactive - session = session_factory(started=start1, country_iso="us", user=user) + session = bare_session_factory(started=start1, country_iso="us", user=user) streak = user_streak_manager.get_user_streaks(user_id=user.user_id) assert streak == [] |
