From af66829e26cb05f182bef36ac06d58c7baa0ec1e Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Thu, 26 Feb 2026 20:29:41 -0500 Subject: AMTManager moved to fixture, and dectorator with parameters on tasks and init / non-static class appraoch. More assertion checks and typing. TestMTurkClient seperated from TestAMTManger --- tests/managers/test_hit.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tests/managers/test_hit.py') diff --git a/tests/managers/test_hit.py b/tests/managers/test_hit.py index 56a4f53..974bd18 100644 --- a/tests/managers/test_hit.py +++ b/tests/managers/test_hit.py @@ -11,21 +11,19 @@ class TestHitQuestionManager: class TestHitTypeManager: - def test_create(self, htm: HitTypeManager, hit_type_record_with_amt_id: HitType): + def test_create(self, htm: HitTypeManager, hit_type_record: HitType): - _ = hit_type_record_with_amt_id - - assert isinstance(hit_type_record_with_amt_id.id, int) - assert isinstance(hit_type_record_with_amt_id.amt_hit_type_id, str) + assert isinstance(hit_type_record.id, int) + assert isinstance(hit_type_record.amt_hit_type_id, str) count1 = len(htm.filter_active()) # assert count1 == 1 - hit_type_record_with_amt_id.min_active = 0 - htm.set_min_active(hit_type=hit_type_record_with_amt_id) + hit_type_record.min_active = 0 + htm.set_min_active(hit_type=hit_type_record) count2 = len(htm.filter_active()) - assert count2 == 0 + assert count1 - 1 == count2 class TestHitManager: -- cgit v1.2.3