#NEWLINE# def test_create_valid( self ) : #NEWLINE# #INDENT# form_data = { #NEWLINE# #INDENT# 'title' : 'new-project' , #NEWLINE# 'tldr' : self . get_random_string ( ) , #NEWLINE# 'categories' : [ self . create_project_category ( ) . id ] , #NEWLINE# 'save' : 'value' , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . post ( self . url , form_data , follow = True ) #NEWLINE# new_project = Project . objects . get ( slug = 'new-project' ) #NEWLINE# ( url , status_code ) = response . redirect_chain [ 0 ] #NEWLINE# expected_url = reverse ( 'project-detail' , args = [ new_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 ) )