File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -285,21 +285,18 @@ def test_distinct(self):
285285 self .insert_rows ()
286286 self .insert_rows ()
287287
288- response = (
289- Band .select (Band .name ).where (Band .name == "Pythonistas" ).run_sync ()
290- )
288+ query = Band .select (Band .name ).where (Band .name == "Pythonistas" )
289+ self .assertTrue ("DISTINCT" not in query .__str__ ())
291290
291+ response = query .run_sync ()
292292 self .assertTrue (
293293 response == [{"name" : "Pythonistas" }, {"name" : "Pythonistas" }]
294294 )
295295
296- response = (
297- Band .select (Band .name )
298- .where (Band .name == "Pythonistas" )
299- .distinct ()
300- .run_sync ()
301- )
296+ query = query .distinct ()
297+ self .assertTrue ("DISTINCT" in query .__str__ ())
302298
299+ response = query .run_sync ()
303300 self .assertTrue (response == [{"name" : "Pythonistas" }])
304301
305302 def test_count_group_by (self ):
You can’t perform that action at this time.
0 commit comments