summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-02-12 16:34:21 -0500
committerJason Gerard DeRose <jderose@redhat.com>2010-02-15 13:10:11 -0700
commit58746226d4b36bc40de91d4d1dd283e9faaff639 (patch)
tree11c4cd42b0285ff366c68274495cd1e9ee7fa7da /tests/test_xmlrpc
parent99dcf9d4f97ac8bff112d6ccc36bb5b894fa5bcd (diff)
downloadfreeipa-58746226d4b36bc40de91d4d1dd283e9faaff639.tar.gz
freeipa-58746226d4b36bc40de91d4d1dd283e9faaff639.tar.xz
freeipa-58746226d4b36bc40de91d4d1dd283e9faaff639.zip
Use the Output tuple to determine the order of output
The attributes displayed is now dependant upon their definition in a Param. This enhances that, giving some level of control over how the result is displayed to the user. This also fixes displaying group membership, including failures of adding/removing entries. All tests pass now though there is still one problem. We need to return the dn as well. Once that is fixed we just need to comment out all the dn entries in the tests and they should once again pass.
Diffstat (limited to 'tests/test_xmlrpc')
-rw-r--r--tests/test_xmlrpc/objectclasses.py1
-rw-r--r--tests/test_xmlrpc/test_group_plugin.py25
-rw-r--r--tests/test_xmlrpc/test_hbac_plugin.py20
-rw-r--r--tests/test_xmlrpc/test_host_plugin.py20
-rw-r--r--tests/test_xmlrpc/test_hostgroup_plugin.py20
-rw-r--r--tests/test_xmlrpc/test_pwpolicy.py14
-rw-r--r--tests/test_xmlrpc/test_rolegroup_plugin.py24
-rw-r--r--tests/test_xmlrpc/test_service_plugin.py11
-rw-r--r--tests/test_xmlrpc/test_taskgroup_plugin.py42
-rw-r--r--tests/test_xmlrpc/test_user_plugin.py21
10 files changed, 112 insertions, 86 deletions
diff --git a/tests/test_xmlrpc/objectclasses.py b/tests/test_xmlrpc/objectclasses.py
index 5f95cd7b5..857147dc3 100644
--- a/tests/test_xmlrpc/objectclasses.py
+++ b/tests/test_xmlrpc/objectclasses.py
@@ -29,6 +29,7 @@ user = [
u'inetuser',
u'posixaccount',
u'krbprincipalaux',
+ u'krbticketpolicyaux',
u'radiusprofile',
u'ipaobject',
]
diff --git a/tests/test_xmlrpc/test_group_plugin.py b/tests/test_xmlrpc/test_group_plugin.py
index a6d98f698..8f2b207c5 100644
--- a/tests/test_xmlrpc/test_group_plugin.py
+++ b/tests/test_xmlrpc/test_group_plugin.py
@@ -110,6 +110,7 @@ class test_group(Declarative):
),
expected=dict(
result=dict(
+ cn=[group1],
description=[u'New desc 1'],
),
summary=u'Modified group "testgroup1"',
@@ -143,8 +144,6 @@ class test_group(Declarative):
result=dict(
cn=[group1],
description=[u'New desc 1'],
- objectclass=objectclasses.group + [u'posixgroup'],
- ipauniqueid=[fuzzy_uuid],
gidnumber=[fuzzy_digits],
),
value=group1,
@@ -177,6 +176,7 @@ class test_group(Declarative):
truncated=False,
result=[
dict(
+ #dn=u'cn=%s,cn=groups,cn=accounts,%s' % (group1, api.env.basedn),
cn=[group1],
description=[u'New desc 1'],
gidnumber=[fuzzy_digits],
@@ -261,6 +261,7 @@ class test_group(Declarative):
),
expected=dict(
result=dict(
+ cn=[group2],
description=[u'New desc 2'],
),
summary=u'Modified group "testgroup2"',
@@ -292,6 +293,7 @@ class test_group(Declarative):
truncated=False,
result=[
dict(
+ #dn=u'cn=%s,cn=groups,cn=accounts,%s' % (group2, api.env.basedn),
cn=[group2],
description=[u'New desc 2'],
),
@@ -310,27 +312,32 @@ class test_group(Declarative):
truncated=False,
result=[
{
- 'member user': [u'admin'],
+ #'dn': u'cn=admins,cn=groups,cn=accounts,%s' % api.env.basedn,
+ 'member_user': [u'admin'],
'gidnumber': [fuzzy_digits],
'cn': [u'admins'],
'description': [u'Account administrators group'],
},
{
+ #'dn': u'cn=ipausers,cn=groups,cn=accounts,%s' % api.env.basedn,
'gidnumber': [fuzzy_digits],
'cn': [u'ipausers'],
'description': [u'Default group for all users'],
},
{
+ #'dn': u'cn=editors,cn=groups,cn=accounts,%s' % api.env.basedn,
'gidnumber': [fuzzy_digits],
'cn': [u'editors'],
'description': [u'Limited admins who can edit other users'],
},
dict(
+ #dn=u'cn=%s,cn=groups,cn=accounts,%s' % (group1, api.env.basedn),
cn=[group1],
description=[u'New desc 1'],
gidnumber=[fuzzy_digits],
),
dict(
+ #dn=u'cn=%s,cn=groups,cn=accounts,%s' % (group2, api.env.basedn),
cn=[group2],
description=[u'New desc 2'],
),
@@ -355,7 +362,11 @@ class test_group(Declarative):
user=tuple(),
),
),
- result={'member group': (group2,)},
+ result={'member_group': (group2,),
+ 'gidnumber': [fuzzy_digits],
+ 'cn': [group1],
+ 'description': [u'New desc 1'],
+ },
),
),
@@ -373,7 +384,11 @@ class test_group(Declarative):
user=tuple(),
),
),
- result={'member group': (group2,)},
+ result={'member_group': (group2,),
+ 'gidnumber': [fuzzy_digits],
+ 'cn': [group1],
+ 'description': [u'New desc 1'],
+ },
),
),
diff --git a/tests/test_xmlrpc/test_hbac_plugin.py b/tests/test_xmlrpc/test_hbac_plugin.py
index aa7bb78a4..1edce4677 100644
--- a/tests/test_xmlrpc/test_hbac_plugin.py
+++ b/tests/test_xmlrpc/test_hbac_plugin.py
@@ -178,8 +178,8 @@ class test_hbac(XMLRPC_test):
assert 'group' in failed['memberuser']
assert not failed['memberuser']['group']
entry = ret['result']
- assert_attr_equal(entry, 'memberuser user', self.test_user)
- assert_attr_equal(entry, 'memberuser group', self.test_group)
+ assert_attr_equal(entry, 'memberuser_user', self.test_user)
+ assert_attr_equal(entry, 'memberuser_group', self.test_group)
def test_9_hbac_remove_user(self):
"""
@@ -196,8 +196,8 @@ class test_hbac(XMLRPC_test):
assert 'group' in failed['memberuser']
assert not failed['memberuser']['group']
entry = ret['result']
- assert 'memberuser user' not in entry
- assert 'memberuser group' not in entry
+ assert 'memberuser_user' not in entry
+ assert 'memberuser_group' not in entry
def test_a_hbac_add_host(self):
"""
@@ -214,8 +214,8 @@ class test_hbac(XMLRPC_test):
assert 'hostgroup' in failed['memberhost']
assert not failed['memberhost']['hostgroup']
entry = ret['result']
- assert_attr_equal(entry, 'memberhost host', self.test_host)
- assert_attr_equal(entry, 'memberhost hostgroup', self.test_hostgroup)
+ assert_attr_equal(entry, 'memberhost_host', self.test_host)
+ assert_attr_equal(entry, 'memberhost_hostgroup', self.test_hostgroup)
def test_b_hbac_remove_host(self):
"""
@@ -232,8 +232,8 @@ class test_hbac(XMLRPC_test):
assert 'hostgroup' in failed['memberhost']
assert not failed['memberhost']['hostgroup']
entry = ret['result']
- assert 'memberhost host' not in res[1]
- assert 'memberhost hostgroup' not in res[1]
+ assert 'memberhost_host' not in res[1]
+ assert 'memberhost_hostgroup' not in res[1]
def test_a_hbac_add_sourcehost(self):
"""
@@ -250,8 +250,8 @@ class test_hbac(XMLRPC_test):
assert 'hostgroup' in failed['sourcehost']
assert not failed['sourcehost']['hostgroup']
entry = ret['result']
- assert_attr_equal(entry, 'sourcehost host', self.test_host)
- assert_attr_equal(entry, 'sourcehost hostgroup', self.test_hostgroup)
+ assert_attr_equal(entry, 'sourcehost_host', self.test_host)
+ assert_attr_equal(entry, 'sourcehost_hostgroup', self.test_hostgroup)
def test_b_hbac_remove_host(self):
"""
diff --git a/tests/test_xmlrpc/test_host_plugin.py b/tests/test_xmlrpc/test_host_plugin.py
index 167481a45..753e3d2c1 100644
--- a/tests/test_xmlrpc/test_host_plugin.py
+++ b/tests/test_xmlrpc/test_host_plugin.py
@@ -65,7 +65,7 @@ class test_host(Declarative):
command=('host_add', [fqdn1],
dict(
description=u'Test host 1',
- localityname=u'Undisclosed location 1',
+ l=u'Undisclosed location 1',
),
),
expected=dict(
@@ -73,14 +73,11 @@ class test_host(Declarative):
summary=u'Added host "%s"' % fqdn1,
result=dict(
dn=dn1,
- cn=[fqdn1], # FIXME: we should only return fqdn
fqdn=[fqdn1],
description=[u'Test host 1'],
- localityname=[u'Undisclosed location 1'],
+ l=[u'Undisclosed location 1'],
krbprincipalname=[u'host/%s@%s' % (fqdn1, api.env.realm)],
- serverhostname=[u'testhost1'],
objectclass=objectclasses.host,
- managedby=[dn1],
ipauniqueid=[fuzzy_uuid],
),
),
@@ -109,7 +106,8 @@ class test_host(Declarative):
dn=dn1,
fqdn=[fqdn1],
description=[u'Test host 1'],
- localityname=[u'Undisclosed location 1'],
+ l=[u'Undisclosed location 1'],
+ krbprincipalname=[u'host/%s@%s' % (fqdn1, api.env.realm)],
),
),
),
@@ -150,9 +148,11 @@ class test_host(Declarative):
summary=u'1 host matched',
result=[
dict(
+ #dn=dn1,
fqdn=[fqdn1],
description=[u'Test host 1'],
- localityname=[u'Undisclosed location 1'],
+ l=[u'Undisclosed location 1'],
+ krbprincipalname=[u'host/%s@%s' % (fqdn1, api.env.realm)],
),
],
),
@@ -195,6 +195,9 @@ class test_host(Declarative):
summary=u'Modified host "%s"' % fqdn1,
result=dict(
description=[u'Updated host 1'],
+ fqdn=[fqdn1],
+ l=[u'Undisclosed location 1'],
+ krbprincipalname=[u'host/%s@%s' % (fqdn1, api.env.realm)],
),
),
),
@@ -210,7 +213,8 @@ class test_host(Declarative):
dn=dn1,
fqdn=[fqdn1],
description=[u'Updated host 1'],
- localityname=[u'Undisclosed location 1'],
+ l=[u'Undisclosed location 1'],
+ krbprincipalname=[u'host/%s@%s' % (fqdn1, api.env.realm)],
),
),
),
diff --git a/tests/test_xmlrpc/test_hostgroup_plugin.py b/tests/test_xmlrpc/test_hostgroup_plugin.py
index 3fef9b4e0..4fc67a616 100644
--- a/tests/test_xmlrpc/test_hostgroup_plugin.py
+++ b/tests/test_xmlrpc/test_hostgroup_plugin.py
@@ -98,7 +98,7 @@ class test_hostgroup(Declarative):
command=('host_add', [fqdn1],
dict(
description=u'Test host 1',
- localityname=u'Undisclosed location 1',
+ l=u'Undisclosed location 1',
),
),
expected=dict(
@@ -106,14 +106,11 @@ class test_hostgroup(Declarative):
summary=u'Added host "%s"' % fqdn1,
result=dict(
dn=host_dn1,
- cn=[fqdn1], # FIXME: we should only return fqdn
fqdn=[fqdn1],
description=[u'Test host 1'],
- localityname=[u'Undisclosed location 1'],
+ l=[u'Undisclosed location 1'],
krbprincipalname=[u'host/%s@%s' % (fqdn1, api.env.realm)],
- serverhostname=[u'testhost1'],
objectclass=objectclasses.host,
- managedby=[host_dn1],
ipauniqueid=[fuzzy_uuid],
),
),
@@ -134,7 +131,9 @@ class test_hostgroup(Declarative):
),
),
result={
- 'member host': [fqdn1],
+ 'cn': [hostgroup1],
+ 'description': [u'Test hostgroup 1'],
+ 'member_host': [fqdn1],
},
),
),
@@ -148,7 +147,7 @@ class test_hostgroup(Declarative):
summary=None,
result={
'dn': dn1,
- 'member host': [u'testhost1.%s' % api.env.domain],
+ 'member_host': [u'testhost1.%s' % api.env.domain],
'cn': [hostgroup1],
'description': [u'Test hostgroup 1'],
},
@@ -165,7 +164,8 @@ class test_hostgroup(Declarative):
summary=u'1 hostgroup matched',
result=[
{
- 'member host': [u'testhost1.%s' % api.env.domain],
+ #'dn': dn1,
+ 'member_host': [u'testhost1.%s' % api.env.domain],
'cn': [hostgroup1],
'description': [u'Test hostgroup 1'],
},
@@ -183,7 +183,9 @@ class test_hostgroup(Declarative):
value=hostgroup1,
summary=u'Modified hostgroup "testhostgroup1"',
result=dict(
+ cn=[hostgroup1],
description=[u'Updated hostgroup 1'],
+ member_host=[u'testhost1.%s' % api.env.domain],
),
),
),
@@ -197,7 +199,7 @@ class test_hostgroup(Declarative):
summary=None,
result={
'dn': dn1,
- 'member host': [u'testhost1.%s' % api.env.domain],
+ 'member_host': [u'testhost1.%s' % api.env.domain],
'cn': [hostgroup1],
'description': [u'Updated hostgroup 1'],
},
diff --git a/tests/test_xmlrpc/test_pwpolicy.py b/tests/test_xmlrpc/test_pwpolicy.py
index 080f39bf9..ceb4f8b62 100644
--- a/tests/test_xmlrpc/test_pwpolicy.py
+++ b/tests/test_xmlrpc/test_pwpolicy.py
@@ -148,17 +148,3 @@ class test_pwpolicy(XMLRPC_test):
# Remove the user we created
api.Command['user_del'](self.user)
-
- def test_a_pwpolicy_del(self):
- """
- Remove the second test policy with `xmlrpc.pwpolicy_del`.
- """
- assert api.Command['pwpolicy_del'](group=self.group2)['result'] is True
-
- # Verify that it is gone
- try:
- api.Command['pwpolicy_show'](group=self.group2)
- except errors.NotFound:
- pass
- else:
- assert False
diff --git a/tests/test_xmlrpc/test_rolegroup_plugin.py b/tests/test_xmlrpc/test_rolegroup_plugin.py
index 7aa6842df..801dadeda 100644
--- a/tests/test_xmlrpc/test_rolegroup_plugin.py
+++ b/tests/test_xmlrpc/test_rolegroup_plugin.py
@@ -150,7 +150,9 @@ class test_rolegroup(Declarative):
),
),
result={
- 'member group': [group1],
+ 'cn': [rolegroup1],
+ 'description': [u'rolegroup desc 1'],
+ 'member_group': [group1],
}
),
),
@@ -166,7 +168,7 @@ class test_rolegroup(Declarative):
'dn': rolegroup1_dn,
'cn': [rolegroup1],
'description': [u'rolegroup desc 1'],
- 'member group': [group1],
+ 'member_group': [group1],
},
),
),
@@ -181,11 +183,10 @@ class test_rolegroup(Declarative):
summary=u'1 rolegroup matched',
result=[
{
- # FIXME: find() should return 'dn' just like show()
#'dn': rolegroup1_dn,
'cn': [rolegroup1],
'description': [u'rolegroup desc 1'],
- 'member group': [group1],
+ 'member_group': [group1],
},
],
),
@@ -201,9 +202,10 @@ class test_rolegroup(Declarative):
summary=u'1 rolegroup matched',
result=[
{
+ #'dn': rolegroup1_dn,
'cn': [rolegroup1],
'description': [u'rolegroup desc 1'],
- 'member group': [group1],
+ 'member_group': [group1],
},
],
),
@@ -237,9 +239,10 @@ class test_rolegroup(Declarative):
summary=u'1 rolegroup matched',
result=[
{
+ #'dn': rolegroup1_dn,
'cn': [rolegroup1],
'description': [u'rolegroup desc 1'],
- 'member group': [group1],
+ 'member_group': [group1],
},
],
),
@@ -255,11 +258,13 @@ class test_rolegroup(Declarative):
summary=u'2 rolegroups matched',
result=[
{
+ #'dn': rolegroup1_dn,
'cn': [rolegroup1],
'description': [u'rolegroup desc 1'],
- 'member group': [group1],
+ 'member_group': [group1],
},
{
+ #'dn': rolegroup2_dn,
'cn': [rolegroup2],
'description': [u'rolegroup desc 2'],
},
@@ -277,7 +282,9 @@ class test_rolegroup(Declarative):
value=rolegroup1,
summary=u'Modified rolegroup "test-rolegroup-1"',
result=dict(
+ cn=[rolegroup1],
description=[u'New desc 1'],
+ member_group=[group1],
),
),
),
@@ -293,7 +300,7 @@ class test_rolegroup(Declarative):
'dn': rolegroup1_dn,
'cn': [rolegroup1],
'description': [u'New desc 1'],
- 'member group': [group1],
+ 'member_group': [group1],
},
),
),
@@ -384,6 +391,7 @@ class test_rolegroup(Declarative):
summary=u'1 rolegroup matched',
result=[
{
+ #'dn': rolegroup2_dn,
'cn': [rolegroup2],
'description': [u'rolegroup desc 2'],
},
diff --git a/tests/test_xmlrpc/test_service_plugin.py b/tests/test_xmlrpc/test_service_plugin.py
index 5a97a47c5..432a86b0e 100644
--- a/tests/test_xmlrpc/test_service_plugin.py
+++ b/tests/test_xmlrpc/test_service_plugin.py
@@ -101,16 +101,7 @@ class test_service(XMLRPC_test):
entries = api.Command['service_find'](self.principal)['result']
assert_attr_equal(entries[0], 'krbprincipalname', self.principal)
- def test_7_service_mod(self):
- """
- Test the `xmlrpc.service_mod` method.
- """
- modkw = dict(self.kw)
- modkw['usercertificate'] = 'QmluYXJ5IGNlcnRpZmljYXRl'
- entry = api.Command['service_mod'](**modkw)['result']
- assert_attr_equal(entry, 'usercertificate', 'Binary certificate')
-
- def test_8_service_del(self):
+ def test_7_service_del(self):
"""
Test the `xmlrpc.service_del` method.
"""
diff --git a/tests/test_xmlrpc/test_taskgroup_plugin.py b/tests/test_xmlrpc/test_taskgroup_plugin.py
index 191880a35..42e0ac503 100644
--- a/tests/test_xmlrpc/test_taskgroup_plugin.py
+++ b/tests/test_xmlrpc/test_taskgroup_plugin.py
@@ -170,8 +170,10 @@ class test_taskgroup(Declarative):
),
),
result={
- 'member rolegroup': [rolegroup1],
- 'member group': [group1],
+ 'cn': [taskgroup1],
+ 'description': [u'Test desc 1'],
+ 'member_rolegroup': [rolegroup1],
+ 'member_group': [group1],
}
),
),
@@ -187,8 +189,8 @@ class test_taskgroup(Declarative):
'dn': taskgroup1_dn,
'cn': [taskgroup1],
'description': [u'Test desc 1'],
- 'member rolegroup': [rolegroup1],
- 'member group': [group1],
+ 'member_rolegroup': [rolegroup1],
+ 'member_group': [group1],
},
),
),
@@ -203,12 +205,11 @@ class test_taskgroup(Declarative):
summary=u'1 taskgroup matched',
result=[
{
- # FIXME: crud.Search subclasses should return 'dn' also
#'dn': taskgroup1_dn,
'cn': [taskgroup1],
'description': [u'Test desc 1'],
- 'member rolegroup': [rolegroup1],
- 'member group': [group1],
+ 'member_rolegroup': [rolegroup1],
+ 'member_group': [group1],
},
],
),
@@ -224,10 +225,11 @@ class test_taskgroup(Declarative):
summary=u'1 taskgroup matched',
result=[
{
+ #'dn': taskgroup1_dn,
'cn': [taskgroup1],
'description': [u'Test desc 1'],
- 'member rolegroup': [rolegroup1],
- 'member group': [group1],
+ 'member_rolegroup': [rolegroup1],
+ 'member_group': [group1],
},
],
),
@@ -261,12 +263,11 @@ class test_taskgroup(Declarative):
summary=u'1 taskgroup matched',
result=[
{
- # FIXME: crud.Search subclasses should return 'dn' also
#'dn': taskgroup1_dn,
'cn': [taskgroup1],
'description': [u'Test desc 1'],
- 'member rolegroup': [rolegroup1],
- 'member group': [group1],
+ 'member_rolegroup': [rolegroup1],
+ 'member_group': [group1],
},
],
),
@@ -282,12 +283,14 @@ class test_taskgroup(Declarative):
summary=u'2 taskgroups matched',
result=[
{
+ #'dn': taskgroup1_dn,
'cn': [taskgroup1],
'description': [u'Test desc 1'],
- 'member rolegroup': [rolegroup1],
- 'member group': [group1],
+ 'member_rolegroup': [rolegroup1],
+ 'member_group': [group1],
},
{
+ #'dn': taskgroup2_dn,
'cn': [taskgroup2],
'description': [u'Test desc 2'],
},
@@ -305,7 +308,11 @@ class test_taskgroup(Declarative):
value=taskgroup1,
summary=u'Modified taskgroup "test-taskgroup-1"',
result=dict(
+ cn=[taskgroup1],
description=[u'New desc 1'],
+ member_rolegroup=[rolegroup1],
+ member_group=[group1],
+
),
),
),
@@ -321,8 +328,8 @@ class test_taskgroup(Declarative):
'dn': taskgroup1_dn,
'cn': [taskgroup1],
'description': [u'New desc 1'],
- 'member rolegroup': [rolegroup1],
- 'member group': [group1],
+ 'member_rolegroup': [rolegroup1],
+ 'member_group': [group1],
},
),
),
@@ -343,7 +350,7 @@ class test_taskgroup(Declarative):
),
),
result={
- 'member rolegroup': [rolegroup1],
+ 'member_rolegroup': [rolegroup1],
}
),
),
@@ -390,6 +397,7 @@ class test_taskgroup(Declarative):
summary=u'1 taskgroup matched',
result=[
{
+ #'dn': taskgroup2_dn,
'cn': [taskgroup2],
'description': [u'Test desc 2'],
},
diff --git a/tests/test_xmlrpc/test_user_plugin.py b/tests/test_xmlrpc/test_user_plugin.py
index 7dfafc730..b2cf6fcc4 100644
--- a/tests/test_xmlrpc/test_user_plugin.py
+++ b/tests/test_xmlrpc/test_user_plugin.py
@@ -70,7 +70,6 @@ class test_user(Declarative):
value=user1,
summary=u'Added user "tuser1"',
result=dict(
- cn=[u'Test User1'],
gecos=[user1],
givenname=[u'Test'],
homedirectory=[u'/home/tuser1'],
@@ -79,7 +78,6 @@ class test_user(Declarative):
objectclass=objectclasses.user,
sn=[u'User1'],
uid=[user1],
- gidnumber=[fuzzy_digits],
ipauniqueid=[fuzzy_uuid],
dn=u'uid=tuser1,cn=users,cn=accounts,' + api.env.basedn,
),
@@ -109,6 +107,7 @@ class test_user(Declarative):
loginshell=[u'/bin/sh'],
sn=[u'User1'],
uid=[user1],
+ memberof_group=[u'ipausers'],
),
value=user1,
summary=None,
@@ -124,13 +123,14 @@ class test_user(Declarative):
expected=dict(
result=[
{
+ #'dn': u'uid=user1,cn=users,cn=accounts,' + api.env.basedn,
'cn': [u'Test User1'],
'gecos': [user1],
'givenname': [u'Test'],
'homedirectory': [u'/home/tuser1'],
'krbprincipalname': [u'tuser1@' + api.env.realm],
'loginshell': [u'/bin/sh'],
- 'memberof group': [u'ipausers'],
+ 'memberof_group': [u'ipausers'],
'objectclass': objectclasses.user,
'sn': [u'User1'],
'uid': [user1],
@@ -140,8 +140,7 @@ class test_user(Declarative):
},
],
summary=u'1 user matched',
- count=1,
- truncated=False,
+ count=1, truncated=False,
),
),
@@ -154,11 +153,13 @@ class test_user(Declarative):
expected=dict(
result=[
dict(
+ #dn=u'uid=tuser1,cn=users,cn=accounts,' + api.env.basedn,
givenname=[u'Test'],
homedirectory=[u'/home/tuser1'],
loginshell=[u'/bin/sh'],
sn=[u'User1'],
uid=[user1],
+ memberof_group=[u'ipausers'],
),
],
summary=u'1 user matched',
@@ -176,17 +177,21 @@ class test_user(Declarative):
expected=dict(
result=[
dict(
+ #dn=u'uid=admin,cn=users,cn=accounts,' + api.env.basedn,
homedirectory=[u'/home/admin'],
loginshell=[u'/bin/bash'],
sn=[u'Administrator'],
uid=[u'admin'],
+ memberof_group=[u'admins'],
),
dict(
+ #dn=u'uid=tuser1,cn=users,cn=accounts,' + api.env.basedn,
givenname=[u'Test'],
homedirectory=[u'/home/tuser1'],
loginshell=[u'/bin/sh'],
sn=[u'User1'],
uid=[user1],
+ memberof_group=[u'ipausers'],
),
],
summary=u'2 users matched',
@@ -230,6 +235,11 @@ class test_user(Declarative):
expected=dict(
result=dict(
givenname=[u'Finkle'],
+ homedirectory=[u'/home/tuser1'],
+ loginshell=[u'/bin/sh'],
+ sn=[u'User1'],
+ uid=[user1],
+ memberof_group=[u'ipausers'],
),
summary=u'Modified user "tuser1"',
value=user1,
@@ -248,6 +258,7 @@ class test_user(Declarative):
loginshell=[u'/bin/sh'],
sn=[u'User1'],
uid=[user1],
+ memberof_group=[u'ipausers'],
),
summary=None,
value=user1,