#NEWLINE# def test_reject_non_project_user( self ) : #NEWLINE# #INDENT# other_user = self . create_user ( data = { #NEWLINE# #INDENT# 'password' : 'password' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . client . login ( username = other_user . username , password = 'password' ) #NEWLINE# self . assertEqual ( self . project . status , CONTENT_STATUS_DRAFT ) #NEWLINE# response = self . client . post ( self . url , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , is_ajax = True ) #NEWLINE# project = Project . objects . get ( slug = self . project . slug ) #NEWLINE# self . assertEqual ( response . status_code , 403 ) #NEWLINE# self . assertEqual ( project . status , CONTENT_STATUS_DRAFT )