#NEWLINE# def test_get_with_filter_and_query_injection( self ) : #NEWLINE# #INDENT# ' Test viewset with query injection ' #NEWLINE# url = '/users/?name=1' #NEWLINE# with self . assertNumQueries ( 1 ) : #NEWLINE# #INDENT# response = self . client . get ( url ) #NEWLINE# #UNINDENT# self . assertEquals ( 200 , self . status_code ) #NEWLINE# data = json . loads ( response . content . decode ( 'utf-8' ) ) #NEWLINE# self . assertEquals ( len ( data [ 'users' ] ) , 1 ) #NEWLINE# self . assertEquals ( data [ 'users' ] [ 0 ] [ 'name' ] , '1' )