Skip to content

Commit 82de65b

Browse files
committed
mock check mock save
1 parent 52a2bc9 commit 82de65b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api_tests/metrics/test_counted_usage.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ def assert_saved_with(mock_save, *, expected_doc_id=None, expected_attrs):
3838

3939
@pytest.fixture
4040
def mock_save():
41-
with mock.patch('elasticsearch6_dsl.Document.save', autospec=True) as mock_save:
42-
yield mock_save
41+
with mock.patch('elasticsearch_metrics.imps.elastic6.BaseMetric.check_index_template'):
42+
with mock.patch('elasticsearch6_dsl.Document.save', autospec=True) as mock_save:
43+
yield mock_save
4344

4445

4546
@pytest.mark.django_db

0 commit comments

Comments
 (0)