#NEWLINE# def test_q_demote( self ) : #NEWLINE# #INDENT# s = self . get_s ( ) . query ( foo__match = 'car' ) #NEWLINE# scores = [ ( sr [ 'id' ] , sr . es_meta . score ) for sr in s . values_dict ( 'id' ) ] #NEWLINE# s = s . demote ( 0.5 , width__term = '5' ) #NEWLINE# demoted_scores = [ ( sr [ 'id' ] , demoted_scores . es_meta . score ) for sr in s . values_dict ( 'id' ) ] #NEWLINE# assert ( scores [ 0 ] != demoted_scores ) #NEWLINE# s = self . get_s ( ) . query ( Q ( foo__match = 'car' ) ) #NEWLINE# scores = [ ( sr [ 'id' ] , sr . es_meta . score ) for sr in s . values_dict ( 'id' ) ] #NEWLINE# s = s . demote ( 0.5 , Q ( width__term = '5' ) ) #NEWLINE# demoted_scores = [ ( sr [ 'id' ] , sr . es_meta . score ) for sr in s . values_dict ( 'id' ) ] #NEWLINE# assert ( scores [ 0 ] != demoted_scores )