from scoring_engine.models.kb import KB

from tests.scoring_engine.unit_test import UnitTest


class TestKB(UnitTest):

    def test_init_property(self):
        kb = KB(name="task_ids", value="1,2,3,4,5,6")
        assert kb.id is None
        assert kb.name == 'task_ids'
        assert kb.value == '1,2,3,4,5,6'

    def test_basic_kb(self):
        kb = KB(name="task_ids", value="1,2,3,4,5,6")
        self.db.save(kb)
        assert kb.id is not None

from scoring_engine.models.kb import KB

from tests.scoring_engine.unit_test import UnitTest


class TestKB(UnitTest):

    def test_init_property(self):
        kb = KB(name="task_ids", value="1,2,3,4,5,6", round_num=100)
        assert kb.id is None
        assert kb.name == 'task_ids'
        assert kb.value == '1,2,3,4,5,6'
        assert kb.round_num == 100

    def test_basic_kb(self):
        kb = KB(name="task_ids", value="1,2,3,4,5,6", round_num=50)
        self.db.save(kb)
        assert kb.id is not None

Update kb test to check for port_num
Update kb test to check for port_num

Signed-off-by: Brandon Myers <9cda508be11a1ae7ceef912b85c196946f0ec5f3@mozilla.com>
