#NEWLINE# def test_list_with_sort_mode_auto( self ) : #NEWLINE# #INDENT# for coll_name in collections : #NEWLINE# #INDENT# coll = getattr ( self . service , coll_name ) #NEWLINE# if ( coll_name == 'jobs' ) : #NEWLINE# #INDENT# expected = [ ent . name for ent in coll . list ( sort_mode = 'auto' , sort_dir = 'asc' , sort_key = 'sid' ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# expected = [ ent . name for ent in coll . list ( sort_mode = 'auto' ) ] #NEWLINE# #UNINDENT# if ( len ( expected ) == 0 ) : #NEWLINE# #INDENT# logging . debug ( 'No entities in collection %s; skipping test.' , coll_name ) #NEWLINE# #UNINDENT# if ( coll_name == 'jobs' ) : #NEWLINE# #INDENT# found = [ ent . name for ent in coll . list ( sort_dir = 'asc' , sort_key = 'sid' ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# found = [ ent . name for ent in coll . list ( ) ] #NEWLINE# #UNINDENT# self . assertEqual ( coll_name , found , msg = ( 'on %s (expected: %s, found: %s)' % ( coll_name , expected , found ) ) )