#NEWLINE# def test_computed_first( self ) : #NEWLINE# #INDENT# q = '' #NEWLINE# s1 = dbcore . query . SlowFieldSort ( 'path' , True ) #NEWLINE# s2 = dbcore . query . FixedFieldSort ( 'year' , True ) #NEWLINE# sort = dbcore . query . MultipleSort ( ) #NEWLINE# sort . add_sort ( s1 ) #NEWLINE# sort . add_sort ( s2 ) #NEWLINE# results = self . lib . albums ( q , sort ) #NEWLINE# self . assertLessEqual ( results [ 0 ] [ 'path' ] , results [ 1 ] [ 'path' ] ) #NEWLINE# self . assertLessEqual ( results [ 1 ] [ 'path' ] , results [ 2 ] [ 'path' ] ) #NEWLINE# q = 'path+ year+' #NEWLINE# results2 = self . lib . albums ( q ) #NEWLINE# for ( r1 , r2 ) in zip ( s1 , results2 ) : #NEWLINE# #INDENT# self . assertEqual ( r1 . id , r2 . id )