#NEWLINE# @ mock . patch ( 'framework.celery_tasks.handlers.enqueue_task' ) #NEWLINE# def test_non_contributor_GET_disapproval_returns_HTTPError( self , mock_enqueue ) : #NEWLINE# #INDENT# non_contributor = factories . AuthUserFactory ( ) #NEWLINE# rejection_token = self . registration . registration_approval . approval_state [ self . user . _id ] [ 'rejection_token' ] #NEWLINE# rejection_url = self . registration . web_url_for ( 'view_project' , token = rejection_token ) #NEWLINE# res = self . app . get ( rejection_url , auth = non_contributor . auth , expect_errors = True ) #NEWLINE# assert_equal ( http . FORBIDDEN , res . status_code ) #NEWLINE# assert_true ( self . registration . is_pending_registration ) #NEWLINE# assert_false ( self . registration . is_registration_approved )