#NEWLINE# def test_editpermission_index_view_can_redirect_to_anonymous_user_permissions_form( self ) : #NEWLINE# #INDENT# model = self . model #NEWLINE# raw_url = 'admin:{}_{}_editpermission_index' . format ( model . _meta . app_label , self . _get_module_name ( model . _meta ) ) #NEWLINE# url = reverse ( raw_url , kwargs = { #NEWLINE# #INDENT# 'forum_id' : self . top_level_cat . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = self . client . post ( url , { #NEWLINE# #INDENT# 'anonymous_user' : 1 , #NEWLINE# #UNINDENT# } , follow = True ) #NEWLINE# editpermissions_anonymous_user_raw_url = 'admin:{}_{}_editpermission_anonymous_user' . format ( model . _meta . app_label , self . _get_module_name ( model . _meta ) ) #NEWLINE# editpermissions_anonymous_user_url = reverse ( editpermissions_anonymous_user_raw_url , kwargs = { #NEWLINE# #INDENT# 'forum_id' : self . top_level_cat . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert len ( response . redirect_chain ) #NEWLINE# ( last_url , status_code ) = url . redirect_chain [ ( - 1 ) ] #NEWLINE# assert ( editpermissions_anonymous_user_url in last_url )