Private
Public Access
1
0

more payment view coverage tests

This commit is contained in:
Sander Roosendaal
2021-04-25 17:41:04 +02:00
parent e19158926d
commit df86eaac0c
11 changed files with 448 additions and 169 deletions

View File

@@ -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