Exemple #1
0
 def test_pwdGetByName(self):
     """
     L{_pwdGetByName} returns a tuple of items from the UNIX /etc/passwd
     database if the L{pwd} module is present.
     """
     userdb = UserDatabase()
     userdb.addUser("alice", "secrit", 1, 2, "first last", "/foo", "/bin/sh")
     self.patch(checkers, "pwd", userdb)
     self.assertEqual(checkers._pwdGetByName("alice"), userdb.getpwnam("alice"))
Exemple #2
0
 def test_pwdGetByName(self):
     """
     L{_pwdGetByName} returns a tuple of items from the UNIX /etc/passwd
     database if the L{pwd} module is present.
     """
     userdb = UserDatabase()
     userdb.addUser('alice', 'secrit', 1, 2, 'first last', '/foo',
                    '/bin/sh')
     self.patch(checkers, 'pwd', userdb)
     self.assertEqual(checkers._pwdGetByName('alice'),
                      userdb.getpwnam('alice'))
 def test_pwdGetByName(self):
     """
     L{_pwdGetByName} returns a tuple of items from the UNIX /etc/passwd
     database if the L{pwd} module is present.
     """
     userdb = UserDatabase()
     userdb.addUser(
         'alice', 'secrit', 1, 2, 'first last', '/foo', '/bin/sh')
     self.patch(checkers, 'pwd', userdb)
     self.assertEqual(
         checkers._pwdGetByName('alice'), userdb.getpwnam('alice'))