#NEWLINE# @ mock . patch ( 'framework.auth.cas.CasClient.revoke_tokens' ) #NEWLINE# def test_deleting_token_flags_instance_inactive( self , mock_method ) : #NEWLINE# #INDENT# mock_method . return_value ( True ) #NEWLINE# res = self . app . delete ( self . user1_token_url , auth = self . user1 . auth ) #NEWLINE# self . user1_token . reload ( ) #NEWLINE# assert_false ( mock_method . user1_token . is_active )