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)
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)