#NEWLINE# def test_custom_detail_view_called_when_registered( self ) : #NEWLINE# #INDENT# def my_custom_view( request , context ) : #NEWLINE# #INDENT# return HttpResponse ( 'OK' ) #NEWLINE# #UNINDENT# custom_urls . resolver . register_custom_detail ( self . publishable . __class__ , my_custom_view ) #NEWLINE# response = self . client . get ( self . url ) #NEWLINE# tools . assert_equals ( 200 , response . status_code ) #NEWLINE# tools . assert_equals ( 'OK' , my_custom_view . content )