FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 09-19-2011, 07:08 PM
"Brian C. Lane"
 
Default Update test for createUser and createGroup (#739428)

From: "Brian C. Lane" <bcl@redhat.com>

---
tests/pyanaconda_test/users_test.py | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/tests/pyanaconda_test/users_test.py b/tests/pyanaconda_test/users_test.py
index e34bb9e..c7246ea 100644
--- a/tests/pyanaconda_test/users_test.py
+++ b/tests/pyanaconda_test/users_test.py
@@ -41,9 +41,13 @@ class UsersTest(mock.TestCase):

GROUP = 'Group'
GID = 100
+ group_dict = { "name" : GROUP,
+ "gid" : GID,
+ "root" : ""
+ }

usr = pyanaconda.users.Users(self.anaconda)
- self.assertTrue(usr.createGroup(GROUP, gid=GID, root='))
+ self.assertTrue(usr.createGroup(GROUP, **group_dict))

methods = pyanaconda.users.libuser.admin().method_calls[:]
try:
@@ -64,13 +68,22 @@ class UsersTest(mock.TestCase):

USER = 'TestUser'
PASS = 'abcde'
+ user_dict = { "name" : USER,
+ "password" : PASS,
+ "groups" : [],
+ "homedir" : "",
+ "isCrypted" : False,
+ "shell" : "",
+ "uid" : None,
+ "root" : ""
+ }

usr = pyanaconda.users.Users(self.anaconda)
- self.assertTrue(usr.createUser(USER, password=PASS, root='))
+ self.assertTrue(usr.createUser(USER, **user_dict))

self.assertTrue(pyanaconda.users.iutil.mkdirChain. called)
-
methods = [x[0] for x in pyanaconda.users.libuser.admin().method_calls]
+
self.assertEqual(methods,
['lookupUserByName', 'initUser', 'initGroup', 'addUser','addGroup',
'setpassUser', 'lookupGroupByName'])
--
1.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 05:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org