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

@@ -58,10 +58,11 @@ from rowers.models import Rower,PaidPlan, CoachingGroup
from rowers.utils import ProcessorCustomerError
def process_webhook(notification):
with open('braintreewebhooks.log','a') as f:
t = time.localtime()
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
f.write(timestamp+' '+notification.kind+'\n')
if not settings.TESTING: # pragma: no cover
with open('braintreewebhooks.log','a') as f:
t = time.localtime()
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
f.write(timestamp+' '+notification.kind+'\n')
if notification.kind == 'subscription_charged_successfully':
return send_invoice(notification.subscription)
if notification.kind == 'subscription_canceled':