diff --git a/rowers/braintreestuff.py b/rowers/braintreestuff.py index bb119be0..3825ff21 100644 --- a/rowers/braintreestuff.py +++ b/rowers/braintreestuff.py @@ -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 diff --git a/rowers/tests/test_payments.py b/rowers/tests/test_payments.py index 8531525d..26a8d708 100644 --- a/rowers/tests/test_payments.py +++ b/rowers/tests/test_payments.py @@ -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'], diff --git a/rowers/tests/testdata/testdata.tcx.gz b/rowers/tests/testdata/testdata.tcx.gz deleted file mode 100644 index ff0f7645..00000000 Binary files a/rowers/tests/testdata/testdata.tcx.gz and /dev/null differ