def test_get_permissions_url_malformed(self, _call): _call.side_effect = paypal.PaypalError(id='580028') assert 'wont-work' in paypal.get_permission_url(self.addon, '', [])
def error_if(*args, **kw): if 'preapprovalKey' in args[1]: raise paypal.PreApprovalError('some error') raise paypal.PaypalError('other error')
def test_refund_permissions_url_malformed(self, _call): _call.side_effect = paypal.PaypalError('580028') assert 'wont-work' in paypal.refund_permission_url(self.addon)