summaryrefslogtreecommitdiffstats
path: root/tests/test_ipalib
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-12-30 13:52:36 -0700
committerJason Gerard DeRose <jderose@redhat.com>2008-12-30 13:52:36 -0700
commit03c9114958e428c5fe6b286df9eda3bd932dc9dc (patch)
treee19ba32f21b56d334138d78185c0a79a5f6cc22b /tests/test_ipalib
parent11e165073eb3bd21d764fa1c4d71f1e6a52eae1b (diff)
downloadfreeipa-03c9114958e428c5fe6b286df9eda3bd932dc9dc.tar.gz
freeipa-03c9114958e428c5fe6b286df9eda3bd932dc9dc.tar.xz
freeipa-03c9114958e428c5fe6b286df9eda3bd932dc9dc.zip
More docstring cleanup in ipalib.config
Diffstat (limited to 'tests/test_ipalib')
-rw-r--r--tests/test_ipalib/test_base.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_ipalib/test_base.py b/tests/test_ipalib/test_base.py
index 9feac6acf..49d5f39df 100644
--- a/tests/test_ipalib/test_base.py
+++ b/tests/test_ipalib/test_base.py
@@ -22,7 +22,7 @@ Test the `ipalib.base` module.
"""
from tests.util import ClassChecker, raises
-from ipalib.constants import NAME_REGEX
+from ipalib.constants import NAME_REGEX, NAME_ERROR
from ipalib.constants import TYPE_ERROR, SET_ERROR, DEL_ERROR
from ipalib import base
@@ -107,10 +107,9 @@ def test_check_name():
assert name is f(name)
e = raises(TypeError, f, unicode(name))
assert str(e) == TYPE_ERROR % ('name', str, unicode(name), unicode)
- error = 'name must match %r; got %r'
for name in nope:
e = raises(ValueError, f, name)
- assert str(e) == error % (NAME_REGEX, name)
+ assert str(e) == NAME_ERROR % (NAME_REGEX, name)
for name in okay:
e = raises(ValueError, f, name.upper())
- assert str(e) == error % (NAME_REGEX, name.upper())
+ assert str(e) == NAME_ERROR % (NAME_REGEX, name.upper())