#NEWLINE# def test_sort_asc( self ) : #NEWLINE# #INDENT# q = '' #NEWLINE# sort = dbcore . query . FixedFieldSort ( 'year' , True ) #NEWLINE# results = self . lib . items ( q , sort ) #NEWLINE# self . assertLessEqual ( results [ 0 ] [ 'year' ] , results [ 1 ] [ 'year' ] ) #NEWLINE# self . assertEqual ( results [ 0 ] [ 'year' ] , 2001 ) #NEWLINE# q = 'year+' #NEWLINE# results2 = self . lib . items ( q ) #NEWLINE# for ( r1 , r2 ) in zip ( results , results2 ) : #NEWLINE# #INDENT# self . assertEqual ( r1 . id , r2 . id )