Use correct variable name ADD_TRIAL_PERIOD_TO_SUBSCRIPTION

This commit is contained in:
PCoder 2019-07-18 09:51:03 +05:30
parent 9b3e292598
commit 494d68bb47
4 changed files with 5 additions and 5 deletions

View file

@ -120,7 +120,7 @@ class CeleryTaskTestCase(TestCase):
stripe_customer.stripe_id,
[{"plan": stripe_plan.get(
'response_object').stripe_plan_id}],
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_5MIN_TRIAL_TO_SUBSCRIPTION else None)
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_TRIAL_PERIOD_TO_SUBSCRIPTION else None)
stripe_subscription_obj = subscription_result.get('response_object')
# Check if the subscription was approved and is active
if stripe_subscription_obj is None \

View file

@ -787,7 +787,7 @@ class OrderConfirmationView(DetailView, FormView):
stripe_api_cus_id,
[{"plan": stripe_plan.get(
'response_object').stripe_plan_id}],
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_5MIN_TRIAL_TO_SUBSCRIPTION else None
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_TRIAL_PERIOD_TO_SUBSCRIPTION else None
)
stripe_subscription_obj = subscription_result.get('response_object')
# Check if the subscription was approved and is active

View file

@ -1035,7 +1035,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView, FormView):
stripe_api_cus_id,
[{"plan": stripe_plan.get(
'response_object').stripe_plan_id}],
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_5MIN_TRIAL_TO_SUBSCRIPTION else None)
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_TRIAL_PERIOD_TO_SUBSCRIPTION else None)
stripe_subscription_obj = subscription_result.get('response_object')
# Check if the subscription was approved and is active
if (stripe_subscription_obj is None or

View file

@ -233,7 +233,7 @@ class StripePlanTestCase(TestStripeCustomerDescription):
stripe_customer.stripe_id,
[{"plan": stripe_plan.get(
'response_object').stripe_plan_id}],
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_5MIN_TRIAL_TO_SUBSCRIPTION else None)
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_TRIAL_PERIOD_TO_SUBSCRIPTION else None)
self.assertIsInstance(result.get('response_object'),
stripe.Subscription)
self.assertIsNone(result.get('error'))
@ -250,7 +250,7 @@ class StripePlanTestCase(TestStripeCustomerDescription):
stripe_customer.stripe_id,
[{"plan": stripe_plan.get(
'response_object').stripe_plan_id}],
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_5MIN_TRIAL_TO_SUBSCRIPTION else None)
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_TRIAL_PERIOD_TO_SUBSCRIPTION else None)
self.assertIsNone(result.get('response_object'), None)
self.assertIsNotNone(result.get('error'))