Ejemplo n.º 1
0
 def test_mapping_initialization(self):
     initialize_index_and_mapping(self.es, TEST_INDEX_INFO)
     self.assertTrue(mapping_exists(self.es, TEST_INDEX_INFO))
     mapping = get_index_mapping(self.es, self.index, TEST_INDEX_INFO.type)
     # we can't compare the whole dicts because ES adds a bunch of stuff to them
     self.assertEqual(
         TEST_INDEX_INFO.mapping['properties']['doc_type']['index'],
         mapping['properties']['doc_type']['index'])
Ejemplo n.º 2
0
 def test_mapping_initialization(self):
     initialize_index_and_mapping(self.es, TEST_INDEX_INFO)
     self.assertTrue(mapping_exists(self.es, TEST_INDEX_INFO))
     mapping = get_index_mapping(self.es, self.index, TEST_INDEX_INFO.type)
     # we can't compare the whole dicts because ES adds a bunch of stuff to them
     self.assertEqual(
         TEST_INDEX_INFO.mapping['properties']['doc_type']['index'],
         mapping['properties']['doc_type']['index']
     )
Ejemplo n.º 3
0
 def test_mapping_initialization_on_pillow_creation(self):
     pillow = TestElasticPillow()
     self.assertTrue(mapping_exists(self.es, get_index_info_from_pillow(pillow)))
     mapping = get_index_mapping(self.es, self.index, pillow.es_type)
     # we can't compare the whole dicts because ES adds a bunch of stuff to them
     self.assertEqual(
         pillow.default_mapping['properties']['doc_type']['index'],
         mapping['properties']['doc_type']['index']
     )