def test_sanity_check_ok_4(self): d = Definition({'register': 1}) d.set_requiered_field('name') self.assertEqual(d.sanity_check_ok(), False)
def test_sanity_check_ok_3(self): d = Definition({'register': 1, 'name': 'test'}) d.set_requiered_field('name') self.assertEqual(d.sanity_check_ok(), True)
def test_sanity_check_2(self): d = Definition() d.set_requiered_field('name') self.assertEqual(len(d.sanity_check()), 0)
def test_sanity_check_3(self): d = Definition({'register': 1}) d.set_requiered_field('name') self.assertEqual(len(d.sanity_check()), 1)
def test_set_requiered_field(self): d = Definition() d.set_requiered_field('name') self.assertEqual(d.requiered_fields, ['name'])