[F16 PATCH 1/2] Update test for createUser and createGroup (#739428)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Brian C. Lane" <bcl@xxxxxxxxxx>

---
 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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux