247: Added unit tests for errors.RequirementError

This commit is contained in:
Jason Gerard DeRose
2008-09-03 22:29:01 +00:00
parent 004e989dc4
commit 296d59d27a
2 changed files with 24 additions and 4 deletions

View File

@@ -19,6 +19,8 @@
"""
All custom errors raised by `ipalib` package.
Also includes a few utility functions for raising exceptions.
"""
TYPE_FORMAT = '%s: need a %r; got %r'
@@ -155,16 +157,13 @@ class RequirementError(ValidationError):
Raised when a required option was not provided.
"""
def __init__(self, name):
ValidationError.__init__(self, name, None,
'missing required value'
)
ValidationError.__init__(self, name, None, 'Required')
class SetError(IPAError):
msg = 'setting %r, but NameSpace does not allow attribute setting'
class RegistrationError(IPAError):
"""
Base class for errors that occur during plugin registration.