#NEWLINE# def test_delete_without_pk( self ) : #NEWLINE# #INDENT# 'Establish that calling `delete` with keyword arguments works\n        in the way that we expect.\n        ' #NEWLINE# with client . test_mode as t : #NEWLINE# #INDENT# t . register_json ( '/foo/?name=bar' , { #NEWLINE# #INDENT# 'count' : 1 , #NEWLINE# 'results' : [ { #NEWLINE# #INDENT# 'id' : 42 , #NEWLINE# 'name' : 'bar' , #NEWLINE# 'description' : 'baz' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'next' : None , #NEWLINE# 'previous' : None , #NEWLINE# #UNINDENT# } ) #NEWLINE# t . register ( '/foo/42/' , '' , method = 'DELETE' ) #NEWLINE# result = self . res . delete ( name = 'bar' ) #NEWLINE# self . assertEqual ( len ( t . requests ) , 2 ) #NEWLINE# self . assertTrue ( t . requests [ 1 ] . url . endswith ( '/foo/42/' ) ) #NEWLINE# #UNINDENT# self . assertTrue ( t [ 'changed' ] )