diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-05-03 06:47:17 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-05-03 16:54:57 +0200 |
commit | 85185a89dbd62fdb0295f404e60152a68c790ef8 (patch) | |
tree | 8fcb72aa35160297c8837d40776c5dd74b6e2bc4 /tests | |
parent | b8f30bce77837966597f5508625742c1bae04080 (diff) | |
download | freeipa-85185a89dbd62fdb0295f404e60152a68c790ef8.tar.gz freeipa-85185a89dbd62fdb0295f404e60152a68c790ef8.tar.xz freeipa-85185a89dbd62fdb0295f404e60152a68c790ef8.zip |
Update hostname validator error messages in tests
A recent patch changed the error message from the hostname
validator. Update the tests to reflect this change.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_xmlrpc/test_dns_plugin.py | 10 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_host_plugin.py | 2 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_netgroup_plugin.py | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/test_xmlrpc/test_dns_plugin.py b/tests/test_xmlrpc/test_dns_plugin.py index 786c49615..8aeaede50 100644 --- a/tests/test_xmlrpc/test_dns_plugin.py +++ b/tests/test_xmlrpc/test_dns_plugin.py @@ -114,7 +114,7 @@ class test_dns(Declarative): ), expected=errors.ValidationError(name='name', error=u'only letters, numbers, and - are allowed. ' + - u'- must not be the DNS label character'), + u'DNS label may not start or end with -'), ), @@ -478,7 +478,7 @@ class test_dns(Declarative): command=('dnsrecord_add', [dnszone1, u'invalid record'], {'arecord': u'127.0.0.1'}), expected=errors.ValidationError(name='name', error=u'only letters, numbers, _, and - are allowed. ' + - u'- must not be the DNS label character'), + u'DNS label may not start or end with -'), ), @@ -639,7 +639,7 @@ class test_dns(Declarative): 'srv_part_target' : u'foo bar'}), expected=errors.ValidationError(name='srv_target', error=u'invalid domain-name: only letters, numbers, and - ' + - u'are allowed. - must not be the DNS label character'), + u'are allowed. DNS label may not start or end with -'), ), dict( @@ -734,7 +734,7 @@ class test_dns(Declarative): command=('dnsrecord_add', [dnszone1, dnsres1], {'cnamerecord': u'-.example.com' }), expected=errors.ValidationError(name='hostname', error=u'invalid domain-name: only letters, numbers, and - ' + - u'are allowed. - must not be the DNS label character'), + u'are allowed. DNS label may not start or end with -'), ), dict( @@ -908,7 +908,7 @@ class test_dns(Declarative): command=('dnsrecord_add', [revdnszone1, dnsrev1], {'ptrrecord': u'-.example.com' }), expected=errors.ValidationError(name='hostname', error=u'invalid domain-name: only letters, numbers, and - ' + - u'are allowed. - must not be the DNS label character'), + u'are allowed. DNS label may not start or end with -'), ), dict( diff --git a/tests/test_xmlrpc/test_host_plugin.py b/tests/test_xmlrpc/test_host_plugin.py index b7b3567b6..8798168af 100644 --- a/tests/test_xmlrpc/test_host_plugin.py +++ b/tests/test_xmlrpc/test_host_plugin.py @@ -698,7 +698,7 @@ class test_host(Declarative): command=('host_add', [invalidfqdn1], {}), expected=errors.ValidationError(name='hostname', error=u'invalid domain-name: only letters, numbers, and - ' + - u'are allowed. - must not be the DNS label character'), + u'are allowed. DNS label may not start or end with -'), ), diff --git a/tests/test_xmlrpc/test_netgroup_plugin.py b/tests/test_xmlrpc/test_netgroup_plugin.py index afb2ac734..40ad1ea67 100644 --- a/tests/test_xmlrpc/test_netgroup_plugin.py +++ b/tests/test_xmlrpc/test_netgroup_plugin.py @@ -363,7 +363,8 @@ class test_netgroup(Declarative): desc='Add invalid host %r to netgroup %r' % (invalidhost, netgroup1), command=('netgroup_add_member', [netgroup1], dict(host=invalidhost)), expected=errors.ValidationError(name='host', - error='only letters, numbers, _, and - are allowed. - must not be the DNS label character'), + error='only letters, numbers, _, and - are allowed. ' + + u'DNS label may not start or end with -'), ), |