def disable_auto_refresh(func):
@wraps(func)<EOL>def _disable_auto_refresh(self, *args, **kwargs):<EOL><INDENT>try:<EOL><INDENT>self.elastic_conn.indices.put_settings(<EOL>index='<STR_LIT:test>', body={'<STR_LIT:index>': {'<STR_LIT>': '<STR_LIT>'}})<EOL>return func(self, *args, **kwargs)<EOL><DEDENT>finally:<EOL><INDENT>self.elastic_conn.indices.put_settings(<EOL>index='<STR_LIT:test>', body={'<STR_LIT:index>': {'<STR_LIT>': '<STR_LIT>'}})<EOL><DEDENT><DEDENT>return _disable_auto_refresh<EOL>
Disable default 1 second auto refresh in Elasticsearch for a test.

    https://www.elastic.co/guide/en/elasticsearch/reference/current/indices
    -update-settings.html