blob: cb2b35ab8925da8624762b7f9a5128c4da5d581b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
from jb.models import Question
class TestHitQuestionManager:
def test_base(self, question_record):
assert isinstance(question_record, Question)
assert question_record.id is None
class TestHitTypeManager:
def test_create(self, htm, hit_type_with_amt_id):
assert hit_type_with_amt_id.id is None
htm.create(hit_type_with_amt_id)
assert hit_type_with_amt_id.id is not None
res = htm.filter_active()
assert len(res) == 1
hit_type_with_amt_id.min_active = 0
htm.set_min_active(hit_type_with_amt_id)
res = htm.filter_active()
assert len(res) == 0
|