def test_init_schema_index_exists(self, es):
     es.return_value.create_index.side_effect = IndexAlreadyExistsError()
     init_schema()
     self.assertTrue(es.return_value.put_mapping.called)
Exemple #2
0
 def test_init_schema(self, es):
     init_schema()
     self.assertTrue(es.called)
     self.assertTrue(es.return_value.create_index.called)
     self.assertTrue(es.return_value.put_mapping.called)
 def test_init_schema(self, es):
     init_schema()
     self.assertTrue(es.called)
     self.assertTrue(es.return_value.create_index.called)
     self.assertTrue(es.return_value.put_mapping.called)
Exemple #4
0
 def test_init_schema_index_exists(self, es):
     es.return_value.create_index.side_effect = IndexAlreadyExistsError()
     init_schema()
     self.assertTrue(es.return_value.put_mapping.called)