#NEWLINE# def test_solr_to_solr_with_date( self ) : #NEWLINE# #INDENT# self . _index_docs ( 50000 , self . colls [ 0 ] ) #NEWLINE# solr = SolrClient ( test_config [ 'SOLR_SERVER' ] [ 0 ] , devel = True , auth = test_config [ 'SOLR_CREDENTIALS' ] ) #NEWLINE# reindexer = Reindexer ( source = solr , source_coll = 'source_coll' , dest = reindexer , dest_coll = 'dest_coll' , date_field = 'index_date' ) #NEWLINE# reindexer . reindex ( ) #NEWLINE# try : #NEWLINE# #INDENT# self . assertTrue ( ( solr . transport . _action_log [ 1 ] [ 'params' ] [ 'params' ] [ 'sort' ] == 'index_date asc, id desc' ) ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# self . assertTrue ( ( solr . transport . _action_log [ 2 ] [ 'params' ] [ 'params' ] [ 'sort' ] == 'index_date asc, id desc' ) ) #NEWLINE# #UNINDENT# self . assertEqual ( solr . query ( self . colls [ 0 ] , { #NEWLINE# #INDENT# 'q' : '*:*' , #NEWLINE# 'rows' : 10000000 , #NEWLINE# #UNINDENT# } ) . docs . sort ( key = ( lambda x : x [ 'id' ] ) ) , solr . query ( self . colls [ 1 ] , { #NEWLINE# #INDENT# 'q' : '*:*' , #NEWLINE# 'rows' : 10000000 , #NEWLINE# #UNINDENT# } ) . docs . sort ( key = ( lambda x : x [ 'id' ] ) ) )