Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2021-11-11 14:12:26 +01:00
parent db1f10368a
commit 01f79cd557
3 changed files with 4 additions and 3 deletions

View File

@@ -284,7 +284,8 @@ def update_subscription(rower,data,method='up'):
if result.is_success:
yesterday = (timezone.now()-datetime.timedelta(days=1)).date()
rower.paidplan = plan
eurocredits = credits.upgrade(int(amount),rower)
amount_int = int(float(amount))
eurocredits = credits.upgrade(amount_int,rower)
rower.planexpires = result.subscription.billing_period_end_date
rower.teamplanexpires = result.subscription.billing_period_end_date
rower.clubsize = plan.clubsize

View File

@@ -406,8 +406,8 @@ description: ""
@patch('rowers.views.braintreestuff.gateway', side_effect=MockBraintreeGateway)
@patch('rowers.fakturoid.create_invoice',side_effect=mocked_invoiceid)
@patch('rowers.braintreestuff.myqueue')
def test_purchase_trainingplan_view(self, mocked_gateway,mocked_invoiceid,mocked_myqueue):
@patch('rowers.utils.myqueue')
def test_purchase_trainingplan_view(self, mocked_gateway,mocked_invoiceid, mocked_myqueue):
u = UserFactory()
r = Rower.objects.create(user=u,
birthdate=faker.profile()['birthdate'],

Binary file not shown.