#NEWLINE# def test_get_with_include_one_to_many( self ) : #NEWLINE# #INDENT# ' Test o2m without related_name set. ' #NEWLINE# url = '/locations/?filter{id}=1&include[]=users' #NEWLINE# with self . assertNumQueries ( 2 ) : #NEWLINE# #INDENT# response = self . client . get ( url ) #NEWLINE# #UNINDENT# self . assertEquals ( 200 , response . status_code ) #NEWLINE# data = json . loads ( response . content . decode ( 'utf-8' ) ) #NEWLINE# self . assertEquals ( len ( data [ 'locations' ] ) , 1 ) #NEWLINE# self . assertEquals ( len ( data [ 'locations' ] [ 0 ] [ 'users' ] ) , 2 )