diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-03 22:14:25 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-03 22:14:25 +0000 |
commit | 004e989dc493a703b0f85be164409443416bf894 (patch) | |
tree | 5b6b6a75f315183bebc77e58f136d2d5672b539c /ipalib/errors.py | |
parent | 62533bfb2baa2eac7a1361627f90bdda97452605 (diff) | |
download | freeipa-004e989dc493a703b0f85be164409443416bf894.tar.gz freeipa-004e989dc493a703b0f85be164409443416bf894.tar.xz freeipa-004e989dc493a703b0f85be164409443416bf894.zip |
246: Added unit tests for errors.RuleError
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r-- | ipalib/errors.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py index de9a43a53..9f40ddae1 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -145,8 +145,9 @@ class RuleError(ValidationError): Raised when a value fails a validation rule. """ def __init__(self, name, value, error, rule, index=None): - self.rule_name = rule.__name__ - ValidationError.__init__(self, name, value, error, index) + assert callable(rule) + self.rule = rule + ValidationError.__init__(self, name, value, error, index=index) class RequirementError(ValidationError): @@ -233,6 +234,5 @@ class MissingOverrideError(RegistrationError): return self.msg % (self.base.__name__, self.cls.__name__, self.cls) - class TwiceSetError(IPAError): msg = '%s.%s cannot be set twice' |