lots a small stuff
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user