File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -313,13 +313,9 @@ def test_dj_u_distinct(self):
313
313
# Use dj.U to create a list of unique contrast and brightness combinations
314
314
result = dj .U ('contrast' , 'brightness' ) & test_query
315
315
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 }]
318
318
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
You can’t perform that action at this time.
0 commit comments