class documentation

UserDatabaseTestsMixin defines tests which apply to any user database implementation. Subclasses should mix it in, implement setUp to create self.database bound to a user database instance, and implement getExistingUserInfo to return information about a user (such information should be unique per test method).

Method test_getpwnam getpwnam accepts a username and returns the user record associated with it.
Method test_getpwnamRejectsBytes getpwnam rejects a non-str username with an exception.
Method test_getpwuid getpwuid accepts a uid and returns the user record associated with it.
Method test_noSuchName getpwnam raises KeyError when passed a username which does not exist in the user database.
Method test_noSuchUID getpwuid raises KeyError when passed a uid which does not exist in the user database.
Method test_recordIndexable The user record returned by getpwuid, getpwnam, and getpwall is indexable, with successive indexes starting from 0 corresponding to the values of the pw_name, pw_passwd, pw_uid, pw_gid, pw_gecos, pw_dir...
Method test_recordLength The user record returned by getpwuid, getpwnam, and getpwall has a length.
def test_getpwnam(self): (source)

getpwnam accepts a username and returns the user record associated with it.

def test_getpwnamRejectsBytes(self): (source)

getpwnam rejects a non-str username with an exception.

def test_getpwuid(self): (source)

getpwuid accepts a uid and returns the user record associated with it.

def test_noSuchName(self): (source)

getpwnam raises KeyError when passed a username which does not exist in the user database.

def test_noSuchUID(self): (source)

getpwuid raises KeyError when passed a uid which does not exist in the user database.

def test_recordIndexable(self): (source)

The user record returned by getpwuid, getpwnam, and getpwall is indexable, with successive indexes starting from 0 corresponding to the values of the pw_name, pw_passwd, pw_uid, pw_gid, pw_gecos, pw_dir, and pw_shell attributes, respectively.

def test_recordLength(self): (source)

The user record returned by getpwuid, getpwnam, and getpwall has a length.