def test_sanity_check_ok_2(self): d = Definition({'register': 1, 'name': 'test'}) d.set_requiered_field('name') d.sanity_check() self.assertEqual(d.sanity_check_ok(), True)
def test_sanity_check_3(self): d = Definition({'register': 1}) d.set_requiered_field('name') self.assertEqual(len(d.sanity_check()), 1)
def test_sanity_check_ok_1(self): d = Definition({'register': 1}) d.set_requiered_field('name') d.sanity_check() self.assertEqual(d.sanity_check_ok(), False)
def test_sanity_check_2(self): d = Definition() d.set_requiered_field('name') self.assertEqual(len(d.sanity_check()), 0)