Skip to content

Commit 7fb8829

Browse files
committed
Apply suggestions from code review.
1 parent c529071 commit 7fb8829

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/test_fetch.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,9 @@ def test_dj_u_distinct(self):
313313
# Use dj.U to create a list of unique contrast and brightness combinations
314314
result = dj.U('contrast', 'brightness') & test_query
315315
expected_result = [{'contrast': 2, 'brightness': 3},
316-
{'contrast': 3, 'brightness': 2},
317-
{'contrast': 5, 'brightness': 5}]
316+
{'contrast': 3, 'brightness': 2},
317+
{'contrast': 5, 'brightness': 5}]
318318

319-
feched_result = result.fetch(as_dict=True)
320-
321-
# Cleanup table
322-
Stimulus.delete()
323-
324-
# Test to see if the repeated row was removed in the results
325-
assert feched_result == expected_result
319+
fetched_result = result.fetch(as_dict=True, order_by=('contrast', 'brightness'))
320+
Stimulus.delete_quick()
321+
assert fetched_result == expected_result

0 commit comments

Comments
 (0)