#NEWLINE# def test_recordIndexable( self ) : #NEWLINE# #INDENT# '\n        The shadow user record returned by I{getpwnam} and I{getspall} is\n        indexable, with successive indexes starting from 0 corresponding to the\n        values of the C{sp_nam}, C{sp_pwd}, C{sp_lstchg}, C{sp_min}, C{sp_max},\n        C{sp_warn}, C{sp_inact}, C{sp_expire}, and C{sp_flag} attributes,\n        respectively.\n        ' #NEWLINE# db = self . database #NEWLINE# ( username , password , lastChange , min , max , warn , inact , expire , flag ) = self . getExistingUserInfo ( ) #NEWLINE# for entry in [ db . getspnam ( username ) , db . getspall ( ) [ 0 ] ] : #NEWLINE# #INDENT# self . assertEqual ( entry [ 0 ] , username ) #NEWLINE# self . assertEqual ( entry [ 1 ] , password ) #NEWLINE# self . assertEqual ( entry [ 2 ] , lastChange ) #NEWLINE# self . assertEqual ( entry [ 3 ] , expire ) #NEWLINE# self . assertEqual ( entry [ 4 ] , max ) #NEWLINE# self . assertEqual ( entry [ 5 ] , warn ) #NEWLINE# self . assertEqual ( entry [ 6 ] , inact ) #NEWLINE# self . assertEqual ( entry [ 7 ] , expire ) #NEWLINE# self . assertEqual ( entry [ 8 ] , flag ) #NEWLINE# self . assertEqual ( len ( entry ) , len ( list ( entry ) ) ) #NEWLINE# self . assertRaises ( IndexError , getitem , entry , 9 )