From 3c7600b1f7348e726d85230437b78a8a70d2b1b8 Mon Sep 17 00:00:00 2001 From: Adam Goldschmidt Date: Tue, 28 Jan 2020 16:40:12 +0200 Subject: [PATCH 1/2] Update fake_elasticsearch.py add `doc_type="_doc"` to delete method --- elasticmock/fake_elasticsearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticmock/fake_elasticsearch.py b/elasticmock/fake_elasticsearch.py index de1e0ee..346407e 100644 --- a/elasticmock/fake_elasticsearch.py +++ b/elasticmock/fake_elasticsearch.py @@ -227,7 +227,7 @@ def scroll(self, scroll_id, params=None): @query_params('consistency', 'parent', 'refresh', 'replication', 'routing', 'timeout', 'version', 'version_type') - def delete(self, index, doc_type, id, params=None): + def delete(self, index, doc_type="_doc", id, params=None): found = False From 4561dc9b5afc16da7e6650f2af907de916090932 Mon Sep 17 00:00:00 2001 From: Adam Goldschmidt Date: Tue, 28 Jan 2020 16:43:03 +0200 Subject: [PATCH 2/2] fix syntax error --- elasticmock/fake_elasticsearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticmock/fake_elasticsearch.py b/elasticmock/fake_elasticsearch.py index 346407e..4dab154 100644 --- a/elasticmock/fake_elasticsearch.py +++ b/elasticmock/fake_elasticsearch.py @@ -227,7 +227,7 @@ def scroll(self, scroll_id, params=None): @query_params('consistency', 'parent', 'refresh', 'replication', 'routing', 'timeout', 'version', 'version_type') - def delete(self, index, doc_type="_doc", id, params=None): + def delete(self, index, id, doc_type="_doc", params=None): found = False