def test_query_gen(self): ''' Tests the method to get copy fields from Solr. ''' reindexer = Reindexer(source=self.solr, source_coll=self.colls[0], dest=self.solr, dest_coll='doesntmatter') self.assertEqual(reindexer._get_query('cursor'), {'cursorMark': 'cursor', 'rows': reindexer._rows, 'q': '*:*', 'sort': 'id desc'})
def test_query_gen_pershard_distrib(self): ''' Tests the method to get copy fields from Solr. ''' reindexer = Reindexer(source=self.solr, source_coll=self.colls[0], dest=self.solr, dest_coll='doesntmatter', per_shard=True) q = reindexer._get_query('cursor') self.assertTrue('distrib' in q and q['distrib'] == 'false')
def test_query_gen(self): """ Tests the method to get copy fields from Solr. """ reindexer = Reindexer(source=self.solr, source_coll=self.colls[0], dest=self.solr, dest_coll="doesntmatter") self.assertEqual( reindexer._get_query("cursor"), {"cursorMark": "cursor", "rows": reindexer._rows, "q": "*:*", "sort": "id desc"}, )