#NEWLINE# def test_add_contributor_with_non_member( self ) : #NEWLINE# #INDENT# request = self . factory . post ( ( '/ajax/projects/%s/usergroups/%s/users/' % ( self . project . id , self . contributors . id ) ) , { #NEWLINE# #INDENT# 'user_id' : self . user_to_add . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# force_authenticate ( request , user = self . non_member ) #NEWLINE# view = UserGroupUsers . as_view ( ) #NEWLINE# response = view ( request , project_id = self . project . id , usergroup_id = self . contributors . id ) . render ( ) #NEWLINE# self . assertEqual ( response . status_code , 404 ) #NEWLINE# self . assertNotIn ( self . user_to_add , self . contributors . users . all ( ) )