paid plans: 10 tutor questions a day at 179,000 / 1,790,000 toman
Five a day was too close to the free three. Pricing keeps the tutor under ~40% of net revenue at typical use (a third of the cap); full numbers in the cost report and docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -552,13 +552,13 @@ class YearlyPlanSeedTests(TestCase):
|
||||
def test_the_yearly_plan_exists_after_migrations(self):
|
||||
plan = Plan.objects.get(title='اشتراک یکساله')
|
||||
self.assertEqual(plan.duration_days, 365)
|
||||
self.assertEqual((plan.price, plan.ai_daily_quota), (990_000, 5))
|
||||
self.assertEqual((plan.price, plan.ai_daily_quota), (1_790_000, 10))
|
||||
self.assertEqual(plan.currency, 'IRT')
|
||||
self.assertTrue(plan.features)
|
||||
|
||||
def test_a_monthly_plan_is_created_next_to_it(self):
|
||||
plan = Plan.objects.get(duration_days=30)
|
||||
self.assertEqual((plan.price, plan.ai_daily_quota), (99_000, 5))
|
||||
self.assertEqual((plan.price, plan.ai_daily_quota), (179_000, 10))
|
||||
|
||||
def test_repricing_leaves_an_admin_edited_yearly_plan_alone(self):
|
||||
import importlib
|
||||
@@ -566,6 +566,7 @@ class YearlyPlanSeedTests(TestCase):
|
||||
reprice = importlib.import_module('subscription.migrations.0007_plans_priced_by_ai_cost')
|
||||
Plan.objects.filter(title='اشتراک یکساله').update(price=450_000, ai_daily_quota=9)
|
||||
reprice.apply_prices(global_apps, None)
|
||||
importlib.import_module('subscription.migrations.0008_paid_quota_ten_a_day').apply(global_apps, None)
|
||||
plan = Plan.objects.get(title='اشتراک یکساله')
|
||||
self.assertEqual((plan.price, plan.ai_daily_quota), (450_000, 9))
|
||||
self.assertEqual(Plan.objects.filter(duration_days=30).count(), 1)
|
||||
@@ -575,7 +576,7 @@ class YearlyPlanSeedTests(TestCase):
|
||||
cache.clear()
|
||||
data = self.client.get('/api/subscription/plans').json()
|
||||
self.assertEqual(data['freeAiDailyQuota'], 3)
|
||||
self.assertEqual({p['aiDailyQuota'] for p in data['plans']}, {5})
|
||||
self.assertEqual({p['aiDailyQuota'] for p in data['plans']}, {10})
|
||||
|
||||
def test_it_is_served_to_the_app(self):
|
||||
from django.core.cache import cache
|
||||
|
||||
Reference in New Issue
Block a user