more payment view coverage tests
This commit is contained in:
@@ -627,6 +627,16 @@ class payment_method():
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.token = 'liesjeleerdelotje'
|
||||
|
||||
class notification():
|
||||
def __init__(self, *args, **kwargs):
|
||||
print('notifucation')
|
||||
self.kind = 'subscription_canceled'
|
||||
|
||||
class webhook_notification():
|
||||
def parse(*args, **kwargs):
|
||||
print(args,kwargs,'parse')
|
||||
return notification()
|
||||
|
||||
# mock braintree gateway
|
||||
class MockBraintreeGateway:
|
||||
def __init__(self,*args, **kwargs):
|
||||
@@ -636,6 +646,7 @@ class MockBraintreeGateway:
|
||||
self.transaction = transaction()
|
||||
self.subscription = subscription()
|
||||
self.payment_method = payment_method()
|
||||
self.webhook_notification = webhook_notification()
|
||||
|
||||
|
||||
def mocked_gateway(*args, **kwargs):
|
||||
@@ -1218,3 +1229,6 @@ class MockOAuth1Session:
|
||||
|
||||
def post(*args, **kwargs):
|
||||
return MockResponse({},200)
|
||||
|
||||
def mocked_invoiceid(*args,**kwargs):
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user