From f0f96f83c2630e890a2cbcab53f77fd4c37e1684 Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Thu, 19 Feb 2026 02:43:23 -0500 Subject: Models, Project files, some pytests, requirements.. etc --- tests/managers/amt.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/managers/amt.py (limited to 'tests/managers/amt.py') diff --git a/tests/managers/amt.py b/tests/managers/amt.py new file mode 100644 index 0000000..0b2e501 --- /dev/null +++ b/tests/managers/amt.py @@ -0,0 +1,23 @@ +from jb.decorators import HTM, HM, HQM +from jb.managers.amt import AMTManager + + +def test_create_hit_type(hit_type): + assert hit_type.amt_hit_type_id is None + AMTManager.create_hit_type(hit_type=hit_type) + assert hit_type.amt_hit_type_id is not None + + +def test_create_hit_with_hit_type(hit_type_with_amt_id, question): + question = HQM.get_or_create(question) + + hit_type = hit_type_with_amt_id + hit_type = [ + x for x in HTM.filter_active() if x.amt_hit_type_id == hit_type.amt_hit_type_id + ][0] + + hit = AMTManager.create_hit_with_hit_type(hit_type=hit_type, question=question) + assert hit.amt_hit_id is not None + assert hit.id is None + HM.create(hit) + assert hit.id is not None -- cgit v1.2.3