summaryrefslogtreecommitdiffstats
path: root/src/account/test/TestAccount.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/account/test/TestAccount.py')
-rw-r--r--src/account/test/TestAccount.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/account/test/TestAccount.py b/src/account/test/TestAccount.py
index 31c3a96..05d0071 100644
--- a/src/account/test/TestAccount.py
+++ b/src/account/test/TestAccount.py
@@ -18,12 +18,12 @@
# Authors: Roman Rakus <rrakus@redhat.com>
#
-from common import AccountBase
+import common
from methods import *
from lmi.shell import LMIInstance
import subprocess
-class TestAccount(AccountBase):
+class TestAccount(common.AccountBase):
"""
Class for testing LMI_Account class
"""
@@ -31,7 +31,7 @@ class TestAccount(AccountBase):
CLASS_NAME = "LMI_Account"
def tearDown(self):
- clean_account(self.user_name)
+ common.UserOps.clean_account(self.user_name)
def test_account_properties(self):
"""
@@ -53,33 +53,33 @@ class TestAccount(AccountBase):
Account: Test to create user account
"""
# make sure the account will not exist
- clean_account(self.user_name)
+ common.UserOps.clean_account(self.user_name)
lams = self.ns.LMI_AccountManagementService.first_instance()
self.assertIsInstance(lams, LMIInstance)
(retval, rparam, errorstr) = lams.CreateAccount({'Name': self.user_name,
'System': self.system_iname})
self.assertEqual(retval, 0)
# The user now should be created, check it
- self.assertTrue(user_exists(self.user_name))
+ self.assertTrue(common.UserOps.is_user(self.user_name))
def test_delete_account(self):
"""
Account: Test to delete account
"""
# make sure the account will exist
- create_account(self.user_name)
+ common.UserOps.create_account(self.user_name)
inst = self.cim_class.first_instance({"Name": self.user_name})
self.assertIsInstance(inst, LMIInstance)
r = inst.delete()
self.assertTrue(r)
# check if it was really deleted
- self.assertFalse(user_exists(self.user_name))
+ self.assertFalse(common.UserOps.is_user(self.user_name))
def test_modify_account(self):
"""
Account: Test several modifications
"""
- create_account(self.user_name)
+ common.UserOps.create_account(self.user_name)
inst = self.cim_class.first_instance({"Name": self.user_name})
self.assertIsInstance(inst, LMIInstance)
# gecos