fixes
This commit is contained in:
@@ -284,7 +284,8 @@ def update_subscription(rower,data,method='up'):
|
|||||||
if result.is_success:
|
if result.is_success:
|
||||||
yesterday = (timezone.now()-datetime.timedelta(days=1)).date()
|
yesterday = (timezone.now()-datetime.timedelta(days=1)).date()
|
||||||
rower.paidplan = plan
|
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.planexpires = result.subscription.billing_period_end_date
|
||||||
rower.teamplanexpires = result.subscription.billing_period_end_date
|
rower.teamplanexpires = result.subscription.billing_period_end_date
|
||||||
rower.clubsize = plan.clubsize
|
rower.clubsize = plan.clubsize
|
||||||
|
|||||||
@@ -406,8 +406,8 @@ description: ""
|
|||||||
|
|
||||||
@patch('rowers.views.braintreestuff.gateway', side_effect=MockBraintreeGateway)
|
@patch('rowers.views.braintreestuff.gateway', side_effect=MockBraintreeGateway)
|
||||||
@patch('rowers.fakturoid.create_invoice',side_effect=mocked_invoiceid)
|
@patch('rowers.fakturoid.create_invoice',side_effect=mocked_invoiceid)
|
||||||
@patch('rowers.braintreestuff.myqueue')
|
@patch('rowers.utils.myqueue')
|
||||||
def test_purchase_trainingplan_view(self, mocked_gateway,mocked_invoiceid,mocked_myqueue):
|
def test_purchase_trainingplan_view(self, mocked_gateway,mocked_invoiceid, mocked_myqueue):
|
||||||
u = UserFactory()
|
u = UserFactory()
|
||||||
r = Rower.objects.create(user=u,
|
r = Rower.objects.create(user=u,
|
||||||
birthdate=faker.profile()['birthdate'],
|
birthdate=faker.profile()['birthdate'],
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user