Hi,

this patch fixes few Tracker methods for staged and 'normal' user, which were mistakenly modified by my patch 0006.3. Applies for ipa-4-2 branch only.


Lenka
From f632687a338bd17f1b143fa72e040f4111510998 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Wed, 16 Dec 2015 13:44:28 +0100
Subject: [PATCH] Tests: Fix tests for (stage)user plugin

Fixes tests for (stage)user plugin that were mistakenly modified in commit 75675f (patch 0006.3 by ldoudova).
---
 ipatests/test_xmlrpc/test_stageuser_plugin.py | 2 +-
 ipatests/test_xmlrpc/test_user_plugin.py      | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_stageuser_plugin.py b/ipatests/test_xmlrpc/test_stageuser_plugin.py
index ed5fc8b72a944e89a35e1960fee54852955d1a58..efbbab7e68f2ab1c6bd7a3182898aa13c46fad37 100644
--- a/ipatests/test_xmlrpc/test_stageuser_plugin.py
+++ b/ipatests/test_xmlrpc/test_stageuser_plugin.py
@@ -186,7 +186,7 @@ class StageUserTracker(Tracker):
                     (self.kwargs[key].split('@'))[0].lower(),
                     (self.kwargs[key].split('@'))[1])]
             elif key == u'manager':
-                self.attrs[key] = [self.kwargs[key]]
+                self.attrs[key] = [get_user_dn(self.kwargs[key])]
             elif key == u'ipasshpubkey':
                 self.attrs[u'sshpubkeyfp'] = [sshpubkeyfp]
                 self.attrs[key] = [self.kwargs[key]]
diff --git a/ipatests/test_xmlrpc/test_user_plugin.py b/ipatests/test_xmlrpc/test_user_plugin.py
index cce769f8f31fc05df218fd4f5afa8978bce091be..81185e449acaa127aa9429fff9587d39a2be81e6 100644
--- a/ipatests/test_xmlrpc/test_user_plugin.py
+++ b/ipatests/test_xmlrpc/test_user_plugin.py
@@ -1903,10 +1903,6 @@ class UserTracker(Tracker):
             summary=u'Stage user %s activated' % self.uid,
             result=self.filter_attrs(self.activate_keys))
 
-        if 'manager' in expected['result']:
-            expected['result']['manager'] = [
-                unicode(get_user_dn(expected['result']['manager'][0]))]
-
         # work around to eliminate inconsistency in returned objectclass
         # (case sensitive assertion)
         expected['result']['objectclass'] = [item.lower() for item in
-- 
2.4.3

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to