def testValidateRequired(self): field = Bool(title=u'Bool field', description=u'', readonly=False, required=True) field.validate(True) field.validate(False) self.assertRaises(RequiredMissing, field.validate, None)
def testValidate(self): field = Bool(title=u('Bool field'), description=u(''), readonly=False, required=False) field.validate(None) field.validate(True) field.validate(False)
def testValidateRequired(self): field = Bool(title=u('Bool field'), description=u(''), readonly=False, required=True) field.validate(True) field.validate(False) self.assertRaises(RequiredMissing, field.validate, None)
def testValidate(self): field = Bool(title=u'Bool field', description=u'', readonly=False, required=False) field.validate(None) field.validate(True) field.validate(False)