Skip to content

Commit

Permalink
Use EsDocProperties instead of EsConst for "_" fields
Browse files Browse the repository at this point in the history
  • Loading branch information
avihad committed Jul 11, 2016
1 parent b7ed1e2 commit 7ab01f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/test_esutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ def create_results(result_hits, failures=0):
}}

def test_is_get_query_with_results_valid_response_returns_true(self):
es_get_response = {EsConst._TYPE: "type", EsConst._INDEX: "index", EsConst.FIELDS: {},
EsConst._VERSION: 1, EsConst.FOUND: True, EsConst._ID: "id"}
es_get_response = {EsDocProperties.TYPE: "type", EsDocProperties.INDEX: "index", EsConst.FIELDS: {},
EsDocProperties.VERSION: 1, EsConst.FOUND: True, EsDocProperties.ID: "id"}
self.assertTrue(EsUtils.is_get_query_with_results(es_get_response))
4 changes: 0 additions & 4 deletions twistes/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ class EsConst(object):
TOTAL = 'total'
FAILED = 'failed'
SHARDS = '_shards'
_INDEX = "_index"
_TYPE = "_type"
_VERSION = "_version"
_ID = "_id"
ALL_VALUES = '_all'
FIELDS = 'fields'
SCROLL_ID = 'scroll_id'
Expand Down

0 comments on commit 7ab01f8

Please sign in to comment.