diff options
author | Rob Crittenden <rcritten@redhat.com> | 2009-05-13 17:16:05 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-05-19 09:54:17 -0400 |
commit | e5bec4ae39e7a369e1475bed90505565cbd8c847 (patch) | |
tree | 9d2e792b0b259bfd4a5dea31f9bd6de405db43e0 /tests/test_xmlrpc/test_host_plugin.py | |
parent | 7ef34b8cdafa655e757d18c120ab484791531a8e (diff) | |
download | freeipa-e5bec4ae39e7a369e1475bed90505565cbd8c847.tar.gz freeipa-e5bec4ae39e7a369e1475bed90505565cbd8c847.tar.xz freeipa-e5bec4ae39e7a369e1475bed90505565cbd8c847.zip |
Schema change so the nisnetgroup triples work properly.
If we use cn for hostname there is no easy way to distinguish between
a host and a hostgroup. So adding a fqdn attribute to be used to store
the hostname instead.
Diffstat (limited to 'tests/test_xmlrpc/test_host_plugin.py')
-rw-r--r-- | tests/test_xmlrpc/test_host_plugin.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/test_xmlrpc/test_host_plugin.py b/tests/test_xmlrpc/test_host_plugin.py index 11676d08a..6af53834f 100644 --- a/tests/test_xmlrpc/test_host_plugin.py +++ b/tests/test_xmlrpc/test_host_plugin.py @@ -31,10 +31,10 @@ class test_Host(XMLRPC_test): """ Test the `f_host` plugin. """ - cn = u'ipatesthost.%s' % api.env.domain + fqdn = u'ipatesthost.%s' % api.env.domain description = u'Test host' localityname = u'Undisclosed location' - kw={'cn': cn, 'description': description, 'localityname': localityname} + kw={'fqdn': fqdn, 'description': description, 'localityname': localityname} def test_add(self): """ @@ -43,52 +43,52 @@ class test_Host(XMLRPC_test): res = api.Command['host_add'](**self.kw) assert type(res) is dict assert res['description'] == self.description - assert res['cn'] == self.cn + assert res['fqdn'] == self.fqdn assert res['l'] == self.localityname def test_doshow_all(self): """ Test the `xmlrpc.host_show` method with all attributes. """ - kw={'cn':self.cn, 'all': True} + kw={'fqdn':self.fqdn, 'all': True} res = api.Command['host_show'](**kw) assert res assert res.get('description','') == self.description - assert res.get('cn','') == self.cn + assert res.get('fqdn','') == self.fqdn assert res.get('l','') == self.localityname def test_doshow_minimal(self): """ Test the `xmlrpc.host_show` method with default attributes. """ - kw={'cn':self.cn} + kw={'fqdn':self.fqdn} res = api.Command['host_show'](**kw) assert res assert res.get('description','') == self.description - assert res.get('cn','') == self.cn + assert res.get('fqdn','') == self.fqdn assert res.get('localityname','') == self.localityname def test_find_all(self): """ Test the `xmlrpc.host_find` method with all attributes. """ - kw={'cn':self.cn, 'all': True} + kw={'fqdn':self.fqdn, 'all': True} res = api.Command['host_find'](**kw) assert res assert len(res) == 2 assert res[1].get('description','') == self.description - assert res[1].get('cn','') == self.cn + assert res[1].get('fqdn','') == self.fqdn assert res[1].get('l','') == self.localityname def test_find_minimal(self): """ Test the `xmlrpc.host_find` method with default attributes. """ - res = api.Command['host_find'](self.cn) + res = api.Command['host_find'](self.fqdn) assert res assert len(res) == 2 assert res[1].get('description','') == self.description - assert res[1].get('cn','') == self.cn + assert res[1].get('fqdn','') == self.fqdn assert res[1].get('localityname','') == self.localityname def test_mod(self): @@ -96,27 +96,27 @@ class test_Host(XMLRPC_test): Test the `xmlrpc.host_mod` method. """ newdesc = u'Updated host' - modkw={'cn': self.cn, 'description': newdesc} + modkw={'fqdn': self.fqdn, 'description': newdesc} res = api.Command['host_mod'](**modkw) assert res assert res.get('description','') == newdesc # Ok, double-check that it was changed - res = api.Command['host_show'](self.cn) + res = api.Command['host_show'](self.fqdn) assert res assert res.get('description','') == newdesc - assert res.get('cn','') == self.cn + assert res.get('fqdn','') == self.fqdn def test_remove(self): """ Test the `xmlrpc.host_del` method. """ - res = api.Command['host_del'](self.cn) + res = api.Command['host_del'](self.fqdn) assert res == True # Verify that it is gone try: - res = api.Command['host_show'](self.cn) + res = api.Command['host_show'](self.fqdn) except errors.NotFound: pass else: |