#NEWLINE# def test_get_with_filter_outer_joins( self ) : #NEWLINE# #INDENT# '\n        Test that the API does not return duplicate results\n        when the underlying SQL query would return dupes.\n        ' #NEWLINE# user = User . objects . create ( name = 'test' ) #NEWLINE# group_a = Group . objects . create ( name = 'A' ) #NEWLINE# group_b = Group . objects . create ( name = 'B' ) #NEWLINE# user . groups = [ group_a , group_b ] #NEWLINE# response = self . client . get ( '/users/?filter{groups.name.in}=A&filter{groups.name.in}=B' ) #NEWLINE# content = json . loads ( response . content . decode ( 'utf-8' ) ) #NEWLINE# self . assertEqual ( 1 , len ( content [ 'users' ] ) , content )