Remove the guest system entirely: no is_guest/device_id, no guest throttles, phone login is the only way in
accounts.0008 drops the columns and refuses to run while guest rows exist. Docs describe the current state; tests that only proved guest behaviour are gone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ from .services import OrderStateError, apply_order_payment_result, cancel_pendin
|
||||
class _Base(TestCase):
|
||||
def setUp(self):
|
||||
cache.clear()
|
||||
self.user = User.objects.create(phone='09120007401', is_guest=False)
|
||||
self.user = User.objects.create(phone='09120007401')
|
||||
self.client_app = APIClient()
|
||||
self.client_app.credentials(HTTP_AUTHORIZATION=f'Bearer {issue_access_token(self.user.id)}')
|
||||
self.pack = Plan.objects.get(kind='pack', question_credits=20)
|
||||
@@ -107,7 +107,7 @@ class RefundServiceTests(_Base):
|
||||
self.assertEqual(sub.status, 'canceled')
|
||||
|
||||
def test_the_referrers_commission_for_this_order_is_undone(self):
|
||||
referrer = User.objects.create(phone='09120007402', is_guest=False)
|
||||
referrer = User.objects.create(phone='09120007402')
|
||||
account = AffiliateAccount.objects.create(user_id=referrer.id, referral_code='REF1', commission_rate=0.1)
|
||||
Conversion.objects.create(affiliate_account=account, referred_user_id=self.user.id)
|
||||
order = self.paid_pack()
|
||||
|
||||
Reference in New Issue
Block a user