Skip to content

Commit bbf71eb

Browse files
committed
Rename create_models -> create_all
1 parent a41ab89 commit bbf71eb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

annotator/elasticsearch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def drop_all(self):
7272
self.conn.indices.close(self.index)
7373
self.conn.indices.delete(self.index)
7474

75-
def create_models(self, models, analysis_settings):
75+
def create_all(self, models, analysis_settings):
7676
mappings = _compile_mappings(models)
7777

7878
# Test for index existence while also checking if connection works

run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def main():
6262
es.authorization_enabled = app.config['AUTHZ_ON']
6363

6464
try:
65-
es.create_models(models=[annotation.Annotation, document.Document],
65+
es.create_all(models=[annotation.Annotation, document.Document],
6666
analysis_settings=elasticsearch_analyzers.ANALYSIS)
6767
except elasticsearch.exceptions.RequestError as e:
6868
if e.error.startswith('MergeMappingException'):

tests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def setup_class(cls):
3434
es.drop_all()
3535

3636
def setup(self):
37-
es.create_models(models=[annotation.Annotation, document.Document],
37+
es.create_all(models=[annotation.Annotation, document.Document],
3838
analysis_settings=elasticsearch_analyzers.ANALYSIS)
3939
es.conn.cluster.health(wait_for_status='yellow')
4040
self.cli = self.app.test_client()

0 commit comments

Comments
 (0)