def test__accepts_good_names(self): for name in self.EXPECTED_GOOD_NAMES: validate_constraint_label_name(name)
def test__rejects_bad_names(self): for name in self.EXPECTED_BAD_NAMES: with ExpectedException(ConstraintTestException, msg='name=%s' % name): validate_constraint_label_name( name, exception_type=ConstraintTestException)