#NEWLINE# def test_get_date_facet_counts( self ) : #NEWLINE# #INDENT# '\n        Checks the date_range_query generation function. Makes sure the date ranges returned matches what got indexed. \n        ' #NEWLINE# 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 = dt_range , source_coll = 'source_coll' , dest = solr , dest_coll = 'dest_coll' , date_field = 'date' ) #NEWLINE# ( source_facet , dest_facet ) = reindexer . _get_date_facet_counts ( 'DAY' , 'date' , start_date = self . _start_date . date ( ) . isoformat ( ) ) #NEWLINE# for dt_range in source_facet : #NEWLINE# #INDENT# dt = datetime . datetime . strptime ( dt_range , '%Y-%m-%dT%H:%M:%SZ' ) . date ( ) . isoformat ( ) #NEWLINE# if ( source_facet [ dt_range ] != self . date_counts [ dt ] ) : #NEWLINE# #INDENT# logging . info ( '{} - {} - {}' . format ( dt , source_facet [ dt_range ] , self . date_counts [ dt ] ) ) #NEWLINE# #UNINDENT# self . assertEqual ( source_facet [ dt_range ] , self . date_counts [ dt ] )