Ejemplo n.º 1
0
 def test_add_type_mapping(self):
     assert_no_exception_raised(self.search_engine.add_type_mapping, self.object_type, dummy_mapping, 'test_token')
Ejemplo n.º 2
0
 def test_create_index(self):
     searchengine = SearchEngine(self.settings['searchengine.baseurl'], 'test', 'test')
     assert_no_exception_raised(searchengine.remove_index, 'test_token')
     assert_no_exception_raised(searchengine.create_index, 'test_token', data=dummy_index)
Ejemplo n.º 3
0
 def test_remove_index_KO(self):
     searchengine = SearchEngine(self.settings['searchengine.baseurl'], 'testing', 'testing')
     assert_no_exception_raised(searchengine.remove_index, 'test_token')
Ejemplo n.º 4
0
 def test_remove_index(self):
     assert_no_exception_raised(self.search_engine.remove_index, 'test_token')
Ejemplo n.º 5
0
 def test_remove_from_index_no_system_token(self):
     index_db(self.session, self.search_engine, self.system_token, self.object_type)
     object_id = '1'
     assert_no_exception_raised(self.search_engine.remove_from_index, None, self.object_type, object_id)
Ejemplo n.º 6
0
 def test_add_to_index(self):
     object_id = 'test1'
     assert_no_exception_raised(self.search_engine.add_to_index, self.system_token, self.object_type, object_id,
                                json.dumps(testdata))