aboutsummaryrefslogtreecommitdiff
path: root/tests/flow/test_tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/flow/test_tasks.py')
-rw-r--r--tests/flow/test_tasks.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/flow/test_tasks.py b/tests/flow/test_tasks.py
index 37391d1..b708cf9 100644
--- a/tests/flow/test_tasks.py
+++ b/tests/flow/test_tasks.py
@@ -26,8 +26,9 @@ from jb.managers.amt import (
BONUS_MESSAGE,
NO_WORK_APPROVAL_MESSAGE,
)
-from jb.models.currency import USDCent
-from jb.models.definitions import AssignmentStatus, PayoutStatus
+from generalresearchutils.currency import USDCent
+from jb.models.definitions import AssignmentStatus
+from generalresearchutils.models.thl.definitions import PayoutStatus
from jb.models.event import MTurkEvent
@@ -336,7 +337,7 @@ class TestProcessAssignmentSubmitted:
amt_assignment_id,
get_assignment_response: Dict,
caplog,
- hit_in_db,
+ hit_record,
rejected_assignment_stubs,
):
# An assignment is submitted. The hit exists in the DB. The amt assignment id is valid,
@@ -442,7 +443,7 @@ class TestProcessAssignmentSubmitted:
get_assignment_response_rejected_no_tsid,
get_assignment_response_no_tsid,
assignment_in_db_factory,
- hit_in_db,
+ hit_record,
amt_worker_id,
):
# An assignment is submitted. The hit and assignment stub exist in the DB.
@@ -451,9 +452,9 @@ class TestProcessAssignmentSubmitted:
# Going to create and submit 3 assignments w no work
# (all on the same hit, which we don't do in JB for real,
# but doesn't matter here)
- a1 = assignment_in_db_factory(hit_id=hit_in_db.id, amt_worker_id=amt_worker_id)
- a2 = assignment_in_db_factory(hit_id=hit_in_db.id, amt_worker_id=amt_worker_id)
- a3 = assignment_in_db_factory(hit_id=hit_in_db.id, amt_worker_id=amt_worker_id)
+ a1 = assignment_in_db_factory(hit_id=hit_record.id, amt_worker_id=amt_worker_id)
+ a2 = assignment_in_db_factory(hit_id=hit_record.id, amt_worker_id=amt_worker_id)
+ a3 = assignment_in_db_factory(hit_id=hit_record.id, amt_worker_id=amt_worker_id)
assert AM.missing_tsid_count(amt_worker_id=amt_worker_id) == 3
# So now, we'll reject, b/c they've already gotten 3 warnings