#NEWLINE# def test_custom_su_login_url( self ) : #NEWLINE# #INDENT# 'Ensure user is sent to login url following successful login' #NEWLINE# self . client . login ( username = 'authorized' , password = 'pass' ) #NEWLINE# with self . settings ( SU_LOGIN_REDIRECT_URL = '/foo/bar' ) : #NEWLINE# #INDENT# response = self . client . post ( reverse ( 'login_as_user' , args = [ self . destination_user . id ] ) ) #NEWLINE# #UNINDENT# self . assertEqual ( response . status_code , 302 ) #NEWLINE# self . assertTrue ( ( '/foo/bar' in self [ 'Location' ] ) )