Skip to content

Commit

Permalink
Merge pull request #1372 from dhermes/test-proj-query-order
Browse files Browse the repository at this point in the history
Using query order in test_projection_query.
  • Loading branch information
dhermes committed Jan 8, 2016
2 parents 03d4104 + ac6b80f commit 0c74a59
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions system_tests/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ def test_ordered_query(self):
def test_projection_query(self):
filtered_query = self._base_query()
filtered_query.projection = ['name', 'family']
filtered_query.order = ['name', 'family']

# NOTE: There are 9 responses because of Catelyn. She has both
# Stark and Tully as her families, hence occurs twice in
Expand All @@ -279,6 +280,9 @@ def test_projection_query(self):
self.assertEqual(len(entities), expected_matches)

arya_entity = entities[0]
catelyn_tully_entity = entities[3]
sansa_entity = entities[8]

arya_dict = dict(arya_entity)
self.assertEqual(arya_dict, {'name': 'Arya', 'family': 'Stark'})

Expand All @@ -287,13 +291,6 @@ def test_projection_query(self):
self.assertEqual(catelyn_stark_dict,
{'name': 'Catelyn', 'family': 'Stark'})

if EMULATOR_DATASET is None:
catelyn_tully_entity = entities[3]
sansa_entity = entities[8]
else:
catelyn_tully_entity = entities[8]
sansa_entity = entities[7]

catelyn_tully_dict = dict(catelyn_tully_entity)
self.assertEqual(catelyn_tully_dict,
{'name': 'Catelyn', 'family': 'Tully'})
Expand Down

0 comments on commit 0c74a59

Please sign in to comment.