aboutsummaryrefslogtreecommitdiff
path: root/tests/models/thl/test_adjustments.py
diff options
context:
space:
mode:
authorMax Nanis2026-08-24 12:35:35 -0700
committerMax Nanis2026-08-24 12:35:35 -0700
commite2c5de703be45746bacaea4136f24440ff5a291c (patch)
tree9c3d9d448e56357feda24a4b0749370a9a33cb55 /tests/models/thl/test_adjustments.py
parentd48f04ab7f034b9b2039c42cd616d7d7851817b9 (diff)
downloadgeneralresearch-e2c5de703be45746bacaea4136f24440ff5a291c.tar.gz
generalresearch-e2c5de703be45746bacaea4136f24440ff5a291c.zip
Ruff std replacements
Diffstat (limited to 'tests/models/thl/test_adjustments.py')
-rw-r--r--tests/models/thl/test_adjustments.py30
1 files changed, 6 insertions, 24 deletions
diff --git a/tests/models/thl/test_adjustments.py b/tests/models/thl/test_adjustments.py
index c2c035d..30e9bce 100644
--- a/tests/models/thl/test_adjustments.py
+++ b/tests/models/thl/test_adjustments.py
@@ -1,5 +1,5 @@
from collections.abc import Callable
-from datetime import UTC, datetime, timedelta, timezone
+from datetime import UTC, datetime, timedelta
from decimal import Decimal
import pytest
@@ -426,7 +426,7 @@ class TestAdjustments:
s1 = session_factory(
user=user,
wall_count=1,
- wall_req_cpi=Decimal("1"),
+ wall_req_cpi=Decimal(1),
final_status=Status.COMPLETE,
started=utc_hour_ago,
)
@@ -525,7 +525,7 @@ class TestAdjustments:
s1 = session_factory(
user=user,
wall_count=1,
- wall_req_cpi=Decimal("1"),
+ wall_req_cpi=Decimal(1),
final_status=Status.COMPLETE,
started=utc_hour_ago,
)
@@ -534,13 +534,7 @@ class TestAdjustments:
status, status_code_1 = s1.determine_session_status()
thl_net, commission_amount, bp_pay, user_pay = s1.determine_payments()
s1.update(
- **{
- "status": status,
- "status_code_1": status_code_1,
- "finished": utc_hour_ago + timedelta(minutes=10),
- "payout": bp_pay,
- "user_payout": user_pay,
- }
+ status=status, status_code_1=status_code_1, finished=utc_hour_ago + timedelta(minutes=10), payout=bp_pay, user_payout=user_pay
)
w1.update(
adjusted_status=WallAdjustedStatus.ADJUSTED_TO_FAIL,
@@ -592,13 +586,7 @@ class TestAdjustments:
thl_net = Decimal(sum(w.cpi for w in s1.wall_events if w.is_visible_complete()))
payout = user.product.determine_bp_payment(thl_net=thl_net)
s1.update(
- **{
- "status": status,
- "status_code_1": status_code_1,
- "finished": utc_hour_ago + timedelta(minutes=25),
- "payout": payout,
- "user_payout": None,
- }
+ status=status, status_code_1=status_code_1, finished=utc_hour_ago + timedelta(minutes=25), payout=payout, user_payout=None
)
# Test. Adjust first fail to complete. Now we have 2 completes.
@@ -646,13 +634,7 @@ class TestAdjustments:
thl_net = Decimal(sum(w.cpi for w in s1.wall_events if w.is_visible_complete()))
payout = user.product.determine_bp_payment(thl_net)
s1.update(
- **{
- "status": status,
- "status_code_1": status_code_1,
- "finished": utc_hour_ago + timedelta(minutes=25),
- "payout": payout,
- "user_payout": None,
- }
+ status=status, status_code_1=status_code_1, finished=utc_hour_ago + timedelta(minutes=25), payout=payout, user_payout=None
)
# Test. Adjust complete to fail. Now we have 2 fails.