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

def test_recordIndexable(self):

    db = self.database
    (username, password, uid, gid, gecos, dir, shell) = self.getExistingUserInfo()
    for entry in [db.getpwuid(uid), db.getpwnam(username), db.getpwall()[0]]:
        self.assertEqual(entry[0], username)
        self.assertEqual(entry[1], password)
        self.assertEqual(entry[2], uid)
        self.assertEqual(entry[3], gid)
        self.assertEqual(entry[4], gecos)
        self.assertEqual(entry[5], dir)
        self.assertEqual(entry[6], shell)
        self.assertEqual(len(entry), len(list(entry)))
        self.assertRaises(IndexError, getitem, entry, 7)
