With the recent object_name/label changes some tests were failing that were expecting the old value which contained a space. This fixes them.

rob
>From fdfc6b4e7a6c65a00d72e23c33a7b9e9eb5927e3 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Fri, 15 Jul 2011 17:18:42 -0400
Subject: [PATCH] Fix failing tests due to object name changes

Some object names had spaces in them which was bad, update the tests
to reflect the new names.
---
 tests/test_xmlrpc/test_hbac_plugin.py     |    8 ++++----
 tests/test_xmlrpc/test_sudorule_plugin.py |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/test_xmlrpc/test_hbac_plugin.py b/tests/test_xmlrpc/test_hbac_plugin.py
index 29e9f6c..3985b61 100644
--- a/tests/test_xmlrpc/test_hbac_plugin.py
+++ b/tests/test_xmlrpc/test_hbac_plugin.py
@@ -185,7 +185,7 @@ class test_hbac(XMLRPC_test):
         """
         ret = api.Command['user_show'](self.test_user, all=True)
         entry = ret['result']
-        assert_attr_equal(entry, 'memberof_HBAC rule', self.rule_name)
+        assert_attr_equal(entry, 'memberof_hbacrule', self.rule_name)
 
     def test_9_b_show_group(self):
         """
@@ -194,7 +194,7 @@ class test_hbac(XMLRPC_test):
         """
         ret = api.Command['group_show'](self.test_group, all=True)
         entry = ret['result']
-        assert_attr_equal(entry, 'memberof_HBAC rule', self.rule_name)
+        assert_attr_equal(entry, 'memberof_hbacrule', self.rule_name)
 
     def test_9_hbacrule_remove_user(self):
         """
@@ -239,7 +239,7 @@ class test_hbac(XMLRPC_test):
         """
         ret = api.Command['host_show'](self.test_host, all=True)
         entry = ret['result']
-        assert_attr_equal(entry, 'memberof_HBAC rule', self.rule_name)
+        assert_attr_equal(entry, 'memberof_hbacrule', self.rule_name)
 
     def test_a_hbacrule_show_hostgroup(self):
         """
@@ -248,7 +248,7 @@ class test_hbac(XMLRPC_test):
         """
         ret = api.Command['hostgroup_show'](self.test_hostgroup, all=True)
         entry = ret['result']
-        assert_attr_equal(entry, 'memberof_HBAC rule', self.rule_name)
+        assert_attr_equal(entry, 'memberof_hbacrule', self.rule_name)
 
     def test_b_hbacrule_remove_host(self):
         """
diff --git a/tests/test_xmlrpc/test_sudorule_plugin.py b/tests/test_xmlrpc/test_sudorule_plugin.py
index 88c608d..c428899 100644
--- a/tests/test_xmlrpc/test_sudorule_plugin.py
+++ b/tests/test_xmlrpc/test_sudorule_plugin.py
@@ -161,7 +161,7 @@ class test_sudorule(XMLRPC_test):
         """
         ret = api.Command['user_show'](self.test_user, all=True)
         entry = ret['result']
-        assert_attr_equal(entry, 'memberof_Sudo Rule', self.rule_name)
+        assert_attr_equal(entry, 'memberof_sudorule', self.rule_name)
 
     def test_9_b_show_group(self):
         """
@@ -170,7 +170,7 @@ class test_sudorule(XMLRPC_test):
         """
         ret = api.Command['group_show'](self.test_group, all=True)
         entry = ret['result']
-        assert_attr_equal(entry, 'memberof_Sudo Rule', self.rule_name)
+        assert_attr_equal(entry, 'memberof_sudorule', self.rule_name)
 
     def test_9_sudorule_remove_user(self):
         """
@@ -382,7 +382,7 @@ class test_sudorule(XMLRPC_test):
         """
         ret = api.Command['host_show'](self.test_host, all=True)
         entry = ret['result']
-        assert_attr_equal(entry, 'memberof_Sudo Rule', self.rule_name)
+        assert_attr_equal(entry, 'memberof_sudorule', self.rule_name)
 
     def test_a_sudorule_show_hostgroup(self):
         """
@@ -391,7 +391,7 @@ class test_sudorule(XMLRPC_test):
         """
         ret = api.Command['hostgroup_show'](self.test_hostgroup, all=True)
         entry = ret['result']
-        assert_attr_equal(entry, 'memberof_Sudo Rule', self.rule_name)
+        assert_attr_equal(entry, 'memberof_sudorule', self.rule_name)
 
     def test_b_sudorule_remove_host(self):
         """
-- 
1.7.4

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

Reply via email to