#NEWLINE# def test_get_with_filter_deferred( self ) : #NEWLINE# #INDENT# grp = Group . objects . create ( name = 'test group' ) #NEWLINE# user = self . fixture . users [ 0 ] #NEWLINE# user . groups . add ( grp ) #NEWLINE# url = ( '/users/?filter{groups.id}=%s' % grp . pk ) #NEWLINE# response = self . client . get ( url ) #NEWLINE# self . assertEqual ( 200 , response . status_code ) #NEWLINE# content = json . loads ( response . content . decode ( 'utf-8' ) ) #NEWLINE# self . assertEqual ( 1 , len ( content [ 'users' ] ) ) #NEWLINE# self . assertEqual ( user . pk , content [ 'users' ] [ 0 ] [ 'id' ] )