Private
Public Access
1
0

more coverage

This commit is contained in:
Sander Roosendaal
2021-04-26 12:11:46 +02:00
parent 544b27e7c0
commit 7626554ba9
12 changed files with 83 additions and 100 deletions

View File

@@ -5,7 +5,7 @@ from __future__ import unicode_literals
from rowers.models import Rower,PaidPlan
# run once - copies plans to paypal
def planstopaypal():
def planstopaypal(): # pragma: no cover
plans = PaidPlan.objects.all()
for plan in plans:
@@ -14,32 +14,8 @@ def planstopaypal():
plan.external_id = None
plan.save()
#def initiaterowerplans():
# rowers = Rower.objects.filter(paymenttype = 'recurring',paidplan = None)
# for r in rowers:
# r.paymentprocessor = 'paypal'
# r.save()
#def setrowerplans():
# rowers = Rower.objects.all()
# for r in rowers:
# paidplans = PaidPlan.objects.filter(
# shortname = r.rowerplan,
# paymenttype = r.paymenttype,
# clubsize = r.clubsize,
# paymentprocessor=r.paymentprocessor)
# if paidplans:
# r.paidplan = paidplans[0]
# r.save()
# else:
# try:
# print 'Could not set plan for ',r.user.username
# except:
# pass
def is_existing_customer(rower):
def is_existing_customer(rower): # pragma: no cover
if rower.country is not None and rower.customer_id is not None and rower.country != '':
if rower.subscription_id is None or rower.subscription_id == '':
return False
@@ -47,4 +23,3 @@ def is_existing_customer(rower):
return True
return False