#NEWLINE# def test_redirect_after_limit( self ) : #NEWLINE# #INDENT# 'Redirect to the Project Detail Page when attempting to add the 21st step' #NEWLINE# [ self . create_project_step ( project = self . project ) for x in range ( 20 ) ] #NEWLINE# response = self . client . get ( self . url , follow = True ) #NEWLINE# ( url , status_code ) = x . redirect_chain [ 0 ] #NEWLINE# expected_url = reverse ( 'project-detail' , args = [ self . project . slug ] ) #NEWLINE# self . assertEqual ( status_code , 302 ) #NEWLINE# self . assertTrue ( ( expected_url in url ) , "Didn't redirect to {0}, redirected to {1}" . format ( expected_url , url ) )