mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
76: Fleshed out opt.validate(); added corresponding unit tests
This commit is contained in:
@@ -54,6 +54,7 @@ class ValidationError(IPAError):
|
||||
self.error = error
|
||||
super(ValidationError, self).__init__(name, value, error)
|
||||
|
||||
|
||||
class NormalizationError(ValidationError):
|
||||
def __init__(self, name, value, type):
|
||||
self.type = type
|
||||
@@ -62,9 +63,10 @@ class NormalizationError(ValidationError):
|
||||
)
|
||||
|
||||
|
||||
|
||||
class ValidationRuleError(ValidationError):
|
||||
msg = '%r is invalid %r: %s'
|
||||
class RuleError(ValidationError):
|
||||
def __init__(self, name, value, rule, error):
|
||||
self.rule = rule
|
||||
super(RuleError, self).__init__(name, value, error)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user