src/account/test/testAccount.py
(Diff revisions 1 - 2)
|
|
|
56 |
user = self.conn.root.cimv2.LMI_Account.first_instance(key="Name", value=self.myuser) |
|
|
57 |
user.delete() |
|
|
58 |
self.assertFalse(user_exists(self.myuser)) |
|
|
59 |
|
|
|
60 |
# delete group |
|
|
61 |
if group_exists(self.mygroup): |
|
|
62 |
group = self.conn.root.cimv2.LMI_Group.first_instance(key="Name", value=self.mygroup) |
|
|
63 |
group.delete() |
|
|
64 |
self.assertFalse(group_exists(self.mygroup)) |
Don't use lmi related code to cleanup.
Instead please use function from methods.py which is included in upstream account provider test tree.
Use methods like:
clean_account,
Whitespace on the end of line.
src/account/test/testAccount.py
(Diff revisions 1 - 2)
|
def test_modify_user(self): |
100 |
user = None |
108 |
user = None |
101 |
user = self.conn.root.cimv2.LMI_Account.first_instance(key="Name", value=myuser) |
109 |
user = self.conn.root.cimv2.LMI_Account.first_instance(key="Name", value=myuser) |
Why is user initialized to None and then replaced by instance?
src/account/test/testAccount.py
(Diff revisions 1 - 2)
|
def test_modify_user(self): |
|
|
114 |
group = None |
106 |
group = self.conn.root.cimv2.LMI_Group.first_instance(key="Name", value=myuser) |
115 |
group = self.conn.root.cimv2.LMI_Group.first_instance(key="Name", value=myuser) |
Why is there group initialized by None value and then replaced by instance?
src/account/test/testAccount.py
(Diff revisions 1 - 2)
|
def test_modify_user(self): |
106 |
group = self.conn.root.cimv2.LMI_Group.first_instance(key="Name", value=myuser) |
115 |
group = self.conn.root.cimv2.LMI_Group.first_instance(key="Name", value=myuser) |
Use hash for instance filters.
If this not work, please fill bug or add bug to comment.
src/account/test/testAccount.py
(Diff revisions 1 - 2)
|
def test_create_long_char_user(self): |
|
|
162 |
self.myuser = myuser |
|
|
163 |
self.mygroup = mygroup |
|
|
164 |
|
|
|
165 |
# clean user/group by system |
156 |
clean_account(myuser) |
166 |
clean_account(myuser) |
157 |
clean_account(mygroup) |
167 |
clean_account(mygroup) |
Why is there double cleaning?
One in the code (using methods from methods.py) and one in tearDown method (still using openlmi related code).
- Robin Hack
On September 13th, 2013, 7:49 a.m. UTC, Robin Hack wrote:
Review request for OpenLMI Developers.
By Robin Hack.
Updated Sept. 13, 2013, 7:49 a.m.
Repository:
openlmi-providers
Description
Account: Added QA test for account provider.
|
Diffs
- src/account/test/testAccount.py (PRE-CREATION)
View Diff
|