Amend unit tests to match the latest changes in DNS (tickets 2627,
2628) and hardened exception error message checks.

>From 29f0420f5a1c57ffe88ca92548736bd6ce0b1215 Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Tue, 17 Apr 2012 10:26:20 +0200
Subject: [PATCH] Fix DNS and permissions unit tests

Amend unit tests to match the latest changes in DNS (tickets 2627,
2628) and hardened exception error message checks.
---
 tests/test_xmlrpc/test_dns_plugin.py        |    4 ++--
 tests/test_xmlrpc/test_permission_plugin.py |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/test_xmlrpc/test_dns_plugin.py b/tests/test_xmlrpc/test_dns_plugin.py
index 661f87ad53cc339f7fdfa67c8dc65652ffa3d5fd..786c4961535c959ad7d4546f5b0732beaf18710e 100644
--- a/tests/test_xmlrpc/test_dns_plugin.py
+++ b/tests/test_xmlrpc/test_dns_plugin.py
@@ -616,7 +616,7 @@ class test_dns(Declarative):
                 'result': {
                     'objectclass': [u'top', u'idnsrecord', u'idnszone'],
                     'dn': unicode(dnszone1_dn),
-                    'idnsname': [dnszone1],
+                    'idnsname': [u'@'],
                     'mxrecord': [u"0 %s" % dnszone1_mname],
                     'nsrecord': [dnszone1_mname],
                 },
@@ -721,7 +721,7 @@ class test_dns(Declarative):
                 'result': {
                     'objectclass': [u'top', u'idnsrecord', u'idnszone'],
                     'dn': unicode(dnszone1_dn),
-                    'idnsname': [dnszone1],
+                    'idnsname': [u'@'],
                     'mxrecord': [u"0 %s" % dnszone1_mname],
                     'nsrecord': [dnszone1_mname],
                     'locrecord': [u"49 11 42.400 N 16 36 29.600 E 227.64"],
diff --git a/tests/test_xmlrpc/test_permission_plugin.py b/tests/test_xmlrpc/test_permission_plugin.py
index 8ee682a584a3cdc75d20c0696f2fb6cf64fd9d34..1da9d795cf8cee0d6b0dd025cccf0dd9c15c00a3 100644
--- a/tests/test_xmlrpc/test_permission_plugin.py
+++ b/tests/test_xmlrpc/test_permission_plugin.py
@@ -475,7 +475,7 @@ class test_permission(Declarative):
                 'permission_mod', [permission1], dict(rename=u'',
                                                       permissions=u'all',)
             ),
-            expected=errors.ValidationError(name=u'rename',
+            expected=errors.ValidationError(name='rename',
                                     error=u'New name can not be empty'),
         ),
 
-- 
1.7.7.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to