twisted.python.test.test_fakepwd.UserDatabaseTestsMixin(object)
class documentationtwisted.python.test.test_fakepwd
(View In Hierarchy)
Known subclasses: twisted.python.test.test_fakepwd.PwdModuleTests, twisted.python.test.test_fakepwd.UserDatabaseTests
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_getpwuid | getpwuid accepts a uid and returns the user record associated with it. |
Method | test_noSuchUID | getpwuid raises KeyError
when passed a uid which does not exist in the user database. |
Method | test_getpwnam | getpwnam accepts a username 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_recordLength | The user record returned by getpwuid, getpwnam, and getpwall has a length. |
Method | test_recordIndexable | No summary |
getpwuid raises KeyError
when passed a uid which does not exist in the user database.
getpwnam accepts a username and returns the user record associated with it.
getpwnam raises KeyError
when passed a username which does not exist in the user database.