diff options
Diffstat (limited to 'tests/test_install')
-rw-r--r-- | tests/test_install/test_updates.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/tests/test_install/test_updates.py b/tests/test_install/test_updates.py index ffd6ee6d0..b974aa397 100644 --- a/tests/test_install/test_updates.py +++ b/tests/test_install/test_updates.py @@ -22,9 +22,9 @@ Test the `ipaserver/install/ldapupdate.py` module. import unittest import os -import ldap import nose + from ipalib import api from ipalib import errors from ipaserver.install.ldapupdate import LDAPUpdate, BadSyntax @@ -89,11 +89,11 @@ class test_update(unittest.TestCase): with self.assertRaises(errors.NotFound): entries = self.ld.get_entries( - self.container_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.container_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) with self.assertRaises(errors.NotFound): entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) def test_1_add(self): """ @@ -104,7 +104,7 @@ class test_update(unittest.TestCase): self.assertTrue(modified) entries = self.ld.get_entries( - self.container_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.container_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) self.assertEqual(len(entries), 1) entry = entries[0] @@ -115,7 +115,7 @@ class test_update(unittest.TestCase): self.assertEqual(entry.single_value('cn'), 'test') entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) self.assertEqual(len(entries), 1) entry = entries[0] @@ -137,7 +137,7 @@ class test_update(unittest.TestCase): self.assertTrue(modified) entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) self.assertEqual(len(entries), 1) entry = entries[0] self.assertEqual(entry.single_value('gecos'), 'Test User') @@ -150,7 +150,7 @@ class test_update(unittest.TestCase): self.assertTrue(modified) entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) self.assertEqual(len(entries), 1) entry = entries[0] self.assertEqual(entry.single_value('gecos'), 'Test User New') @@ -163,7 +163,7 @@ class test_update(unittest.TestCase): self.assertTrue(modified) entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) self.assertEqual(len(entries), 1) entry = entries[0] self.assertEqual(entry.single_value('gecos'), 'Test User New2') @@ -176,7 +176,7 @@ class test_update(unittest.TestCase): self.assertTrue(modified) entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) self.assertEqual(len(entries), 1) entry = entries[0] self.assertEqual(sorted(entry.get('cn')), sorted(['Test User', 'Test User New'])) @@ -189,7 +189,7 @@ class test_update(unittest.TestCase): self.assertTrue(modified) entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) self.assertEqual(len(entries), 1) entry = entries[0] self.assertEqual(sorted(entry.get('cn')), sorted(['Test User'])) @@ -202,7 +202,7 @@ class test_update(unittest.TestCase): self.assertFalse(modified) entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) self.assertEqual(len(entries), 1) entry = entries[0] self.assertEqual(sorted(entry.get('cn')), sorted(['Test User'])) @@ -221,11 +221,11 @@ class test_update(unittest.TestCase): with self.assertRaises(errors.NotFound): entries = self.ld.get_entries( - self.container_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.container_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) with self.assertRaises(errors.NotFound): entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) def test_8_badsyntax(self): """ @@ -251,11 +251,11 @@ class test_update(unittest.TestCase): # First make sure we're clean with self.assertRaises(errors.NotFound): entries = self.ld.get_entries( - self.container_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.container_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) with self.assertRaises(errors.NotFound): entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) update = { @@ -288,7 +288,7 @@ class test_update(unittest.TestCase): self.assertTrue(modified) entries = self.ld.get_entries( - self.container_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.container_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) self.assertEqual(len(entries), 1) entry = entries[0] @@ -299,7 +299,7 @@ class test_update(unittest.TestCase): self.assertEqual(entry.single_value('cn'), 'test') entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) self.assertEqual(len(entries), 1) entry = entries[0] @@ -330,8 +330,8 @@ class test_update(unittest.TestCase): with self.assertRaises(errors.NotFound): entries = self.ld.get_entries( - self.container_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.container_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) with self.assertRaises(errors.NotFound): entries = self.ld.get_entries( - self.user_dn, ldap.SCOPE_BASE, 'objectclass=*', ['*']) + self.user_dn, self.ld.SCOPE_BASE, 'objectclass=*', ['*']) |