Private
Public Access
1
0

lots a small stuff

This commit is contained in:
Sander Roosendaal
2021-04-26 19:35:11 +02:00
parent 594ee6239a
commit 62d06a2439
33 changed files with 144 additions and 149 deletions

View File

@@ -32,7 +32,7 @@ def get_contacts(rower):
with open('braintreewebhooks.log','a') as f:
f.write('Searching Contact Status code '+str(res.status_code)+'\n')
if res.status_code != 200:
if res.status_code != 200: # pragma: no cover
return None
with open('braintreewebhooks.log','a') as f:
@@ -74,7 +74,7 @@ def create_contact(rower):
with open('braintreewebhooks.log','a') as f:
f.write('Status Code '+str(res.status_code)+'\n')
if res.status_code not in [200,201]:
if res.status_code not in [200,201]: # pragma: no cover
return 0
with open('braintreewebhooks.log','a') as f:
@@ -96,7 +96,7 @@ def create_invoice(rower,amount,braintreeid,dosend=True,
with open('braintreewebhooks.log','a') as f:
f.write('Creating invoice for contact iD '+str(contact_id)+'\n')
if not contact_id:
if not contact_id: # pragma: no cover
return 0
post_data = {
@@ -121,7 +121,7 @@ def create_invoice(rower,amount,braintreeid,dosend=True,
with open('braintreewebhooks.log','a') as f:
f.write('Invoice Created - status code '+str(res.status_code)+'\n')
if res.status_code not in [200,201]:
if res.status_code not in [200,201]: # pragma: no cover
return 0
url = res.json()['url']
@@ -140,7 +140,7 @@ def create_invoice(rower,amount,braintreeid,dosend=True,
with open('braintreewebhooks.log','a') as f:
f.write('Invoice Set to paid - status code '+str(res.status_code)+'\n')
if res.status_code not in [200,201]:
if res.status_code not in [200,201]: # pragma: no cover
return 0
if dosend: