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:
2026-10-05 18:20:10 +03:30
parent 8835e01595
commit 663252a260
61 changed files with 357 additions and 1518 deletions

View File

@@ -26,7 +26,7 @@ from .models import Order
class BazaarPackTests(TestCase):
def setUp(self):
cache.clear()
self.user = User.objects.create(phone='09120007101', is_guest=False)
self.user = User.objects.create(phone='09120007101')
self.client = APIClient()
self.client.credentials(HTTP_AUTHORIZATION=f'Bearer {issue_access_token(self.user.id)}')
self.pack = Plan.objects.get(kind='pack', question_credits=20)
@@ -74,7 +74,7 @@ class BazaarSkuComesFromTheOrderTests(TestCase):
def setUp(self):
cache.clear()
self.user = User.objects.create(phone='09120007102', is_guest=False)
self.user = User.objects.create(phone='09120007102')
self.client = APIClient()
self.client.credentials(HTTP_AUTHORIZATION=f'Bearer {issue_access_token(self.user.id)}')
@@ -105,7 +105,7 @@ class BazaarPurchaseFromTheAppTests(TestCase):
def setUp(self):
cache.clear()
self.user = User.objects.create(phone='09120007103', is_guest=False)
self.user = User.objects.create(phone='09120007103')
self.client = APIClient()
self.client.credentials(HTTP_AUTHORIZATION=f'Bearer {issue_access_token(self.user.id)}')
self.pack = Plan.objects.get(kind='pack', question_credits=20)