summaryrefslogtreecommitdiffstats
path: root/ipatests/test_xmlrpc/test_nesting.py
diff options
context:
space:
mode:
authorAna Krivokapic <akrivoka@redhat.com>2013-08-20 15:34:39 +0200
committerPetr Viktorin <pviktori@redhat.com>2013-08-28 16:45:57 +0200
commit196c4b5f53c5ae9d6a471ed2da1eea4d78746fcb (patch)
tree9a8fcd91ac7147df1fd67b29a1325881f3ae8662 /ipatests/test_xmlrpc/test_nesting.py
parentfed7e7b23182ef0355cdaf6a712d8cce84382872 (diff)
downloadfreeipa-196c4b5f53c5ae9d6a471ed2da1eea4d78746fcb.tar.gz
freeipa-196c4b5f53c5ae9d6a471ed2da1eea4d78746fcb.tar.xz
freeipa-196c4b5f53c5ae9d6a471ed2da1eea4d78746fcb.zip
Fix tests which fail after ipa-adtrust-install
Some unit tests were failing after ipa-adtrust-install has been run on the IPA server, due to missing attributes ('ipantsecurityidentifier') and objectclasses ('ipantuserattrs' and 'ipantgroupattrs'). This patch detects if ipa-adtrust-install has been run, and adds missing attributes and objectclasses where appropriate. https://fedorahosted.org/freeipa/ticket/3852
Diffstat (limited to 'ipatests/test_xmlrpc/test_nesting.py')
-rw-r--r--ipatests/test_xmlrpc/test_nesting.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/ipatests/test_xmlrpc/test_nesting.py b/ipatests/test_xmlrpc/test_nesting.py
index 5c093c93a..850010b87 100644
--- a/ipatests/test_xmlrpc/test_nesting.py
+++ b/ipatests/test_xmlrpc/test_nesting.py
@@ -17,12 +17,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
-Test group nexting an indirect members
+Test group nesting and indirect members
"""
-from ipalib import api, errors
+from ipalib import api
from ipatests.test_xmlrpc import objectclasses
-from xmlrpc_test import Declarative, fuzzy_digits, fuzzy_uuid
+from xmlrpc_test import Declarative, fuzzy_digits, fuzzy_uuid, add_sid, add_oc
from ipapython.dn import DN
group1 = u'testgroup1'
@@ -160,13 +160,13 @@ class test_nesting(Declarative):
expected=dict(
value=user1,
summary=u'Added user "%s"' % user1,
- result=dict(
+ result=add_sid(dict(
gecos=[u'Test User1'],
givenname=[u'Test'],
homedirectory=[u'/home/tuser1'],
krbprincipalname=[u'tuser1@' + api.env.realm],
loginshell=[u'/bin/sh'],
- objectclass=objectclasses.user,
+ objectclass=add_oc(objectclasses.user, u'ipantuserattrs'),
sn=[u'User1'],
uid=[user1],
uidnumber=[fuzzy_digits],
@@ -185,7 +185,7 @@ class test_nesting(Declarative):
has_password=False,
dn=DN(('uid',user1),('cn','users'),('cn','accounts'),
api.env.basedn)
- ),
+ )),
),
),
@@ -198,13 +198,13 @@ class test_nesting(Declarative):
expected=dict(
value=user2,
summary=u'Added user "%s"' % user2,
- result=dict(
+ result=add_sid(dict(
gecos=[u'Test User2'],
givenname=[u'Test'],
homedirectory=[u'/home/tuser2'],
krbprincipalname=[u'tuser2@' + api.env.realm],
loginshell=[u'/bin/sh'],
- objectclass=objectclasses.user,
+ objectclass=add_oc(objectclasses.user, u'ipantuserattrs'),
sn=[u'User2'],
uid=[user2],
uidnumber=[fuzzy_digits],
@@ -223,7 +223,7 @@ class test_nesting(Declarative):
has_password=False,
dn=DN(('uid',user2),('cn','users'),('cn','accounts'),
api.env.basedn)
- ),
+ )),
),
),
@@ -236,13 +236,13 @@ class test_nesting(Declarative):
expected=dict(
value=user3,
summary=u'Added user "%s"' % user3,
- result=dict(
+ result=add_sid(dict(
gecos=[u'Test User3'],
givenname=[u'Test'],
homedirectory=[u'/home/tuser3'],
krbprincipalname=[u'tuser3@' + api.env.realm],
loginshell=[u'/bin/sh'],
- objectclass=objectclasses.user,
+ objectclass=add_oc(objectclasses.user, u'ipantuserattrs'),
sn=[u'User3'],
uid=[user3],
uidnumber=[fuzzy_digits],
@@ -261,7 +261,7 @@ class test_nesting(Declarative):
has_password=False,
dn=DN(('uid',user3),('cn','users'),('cn','accounts'),
api.env.basedn)
- ),
+ )),
),
),
@@ -274,13 +274,13 @@ class test_nesting(Declarative):
expected=dict(
value=user4,
summary=u'Added user "%s"' % user4,
- result=dict(
+ result=add_sid(dict(
gecos=[u'Test User4'],
givenname=[u'Test'],
homedirectory=[u'/home/tuser4'],
krbprincipalname=[u'tuser4@' + api.env.realm],
loginshell=[u'/bin/sh'],
- objectclass=objectclasses.user,
+ objectclass=add_oc(objectclasses.user, u'ipantuserattrs'),
sn=[u'User4'],
uid=[user4],
uidnumber=[fuzzy_digits],
@@ -299,7 +299,7 @@ class test_nesting(Declarative):
has_password=False,
dn=DN(('uid',user4),('cn','users'),('cn','accounts'),
api.env.basedn)
- ),
+ )),
),
),