aboutsummaryrefslogtreecommitdiff
path: root/tests/managers/hit.py
blob: 8fcd6735c54d31ddd105c04ade22882a4c77adff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from jb.decorators import HTM


class TestHitTypeManager:

    def test_create(self, 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