Subscriptions only: Bazaar panel prices (598/898/1398k), assistant quota 5/3/3 from a cost calculation, packs off sale
- subscription.0016: prices equal to the Bazaar panel (senior), ai_daily_quota 5/3/3, card features; packs on_sale=False (one paid pack order, user 26, keeps its credits; pack paths stay for that order and for admin). - Quota math in docs/ai-cost-and-guardrails.md: ~77% of a Bazaar sale reaches us; worst case (full quota every day) the assistant costs 23/27/35% of it. - Assistant quota message points to the subscription, not packs. 982 tests green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,7 @@ from .services import OrderStateError, apply_order_payment_result, cancel_pendin
|
||||
|
||||
class _Base(TestCase):
|
||||
def setUp(self):
|
||||
Plan.objects.filter(kind='pack').update(on_sale=True) # بستهها از ۲۰۲۶-۱۰-۱۲ فروشی نیستند (subscription.0016)؛ مسیرشان برای سفارشهای قبلی و ادمین میماند
|
||||
cache.clear()
|
||||
self.user = User.objects.create(phone='09120007401')
|
||||
self.client_app = APIClient()
|
||||
@@ -141,6 +142,7 @@ class CancelServiceTests(_Base):
|
||||
|
||||
class OrderAdminTests(_Base):
|
||||
def setUp(self):
|
||||
Plan.objects.filter(kind='pack').update(on_sale=True) # بستهها از ۲۰۲۶-۱۰-۱۲ فروشی نیستند (subscription.0016)؛ مسیرشان برای سفارشهای قبلی و ادمین میماند
|
||||
super().setUp()
|
||||
staff = get_user_model().objects.create_superuser('admin', 'a@example.com', 'pw-for-tests-only')
|
||||
self.admin = self.client
|
||||
|
||||
Reference in New Issue
Block a user