diff options
Diffstat (limited to 'src/account/test/TestAccountRaceConditions.py')
-rw-r--r-- | src/account/test/TestAccountRaceConditions.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/account/test/TestAccountRaceConditions.py b/src/account/test/TestAccountRaceConditions.py index cd13d61..3523b96 100644 --- a/src/account/test/TestAccountRaceConditions.py +++ b/src/account/test/TestAccountRaceConditions.py @@ -17,9 +17,9 @@ # # Authors: Alois Mahdal <amahdal@redhat.com> +import common import lmi.test.util import methods -from common import AccountBase, PasswdFile from pywbem import CIMError import threading @@ -119,7 +119,7 @@ class DeletionAttempt(AccountActionAttempt): ## Actual test ## ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ## -class TestAccountRaceConditions(AccountBase): +class TestAccountRaceConditions(common.AccountBase): def setUp(self): self.user_count = 20 # = thread count @@ -142,7 +142,7 @@ class TestAccountRaceConditions(AccountBase): """ Assert /etc/passwd is not corrupt """ - pf = PasswdFile() + pf = common.PasswdFile() errors = pf.get_errors() msg = ("/etc/passwd corrupt: %s\n\nFull text follows:\n%s\n" % (errors, pf.fulltext)) @@ -154,7 +154,7 @@ class TestAccountRaceConditions(AccountBase): """ if count is None: count = self.user_count - pf = PasswdFile({'username_prefix': self.prefix}) + pf = common.PasswdFile({'username_prefix': self.prefix}) oc = count rc = len(pf.users) self.assertEqual(rc, oc, @@ -166,7 +166,7 @@ class TestAccountRaceConditions(AccountBase): """ if nameset is None: nameset = self.names - pf = PasswdFile({'username_prefix': self.prefix}) + pf = common.PasswdFile({'username_prefix': self.prefix}) on = sorted(nameset) rn = sorted(pf.get_names()) self.assertEqual(rn, on, @@ -188,7 +188,7 @@ class TestAccountRaceConditions(AccountBase): """ Account: Test modifications from many threads. """ - [methods.create_account(n) for n in self.names] + [common.UserOps.create_account(n) for n in self.names] perform_attempts(ModificationAttempt, self.names, self.args) self.assertUserCount() self.assertPasswdNotCorrupt() @@ -197,7 +197,7 @@ class TestAccountRaceConditions(AccountBase): """ Account: Test deletions from many threads. """ - [methods.create_account(n) for n in self.names] + [common.UserOps.create_account(n) for n in self.names] perform_attempts(DeletionAttempt, self.names, self.args) self.assertUserCount(0) self.assertPasswdNotCorrupt() |