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:
@@ -183,7 +183,7 @@ class ConversationMemoryTests(TestCase):
|
||||
cache.clear()
|
||||
|
||||
def _user(self, phone):
|
||||
user = User.objects.create(phone=phone, is_guest=False)
|
||||
user = User.objects.create(phone=phone)
|
||||
client = APIClient()
|
||||
client.credentials(HTTP_AUTHORIZATION=f'Bearer {issue_access_token(user.id)}')
|
||||
return client
|
||||
@@ -231,7 +231,7 @@ class ProviderStateTests(TestCase):
|
||||
def setUp(self):
|
||||
cache.clear()
|
||||
reset_clients_cache()
|
||||
user = User.objects.create(phone='09120000904', is_guest=False)
|
||||
user = User.objects.create(phone='09120000904')
|
||||
self.client = APIClient()
|
||||
self.client.credentials(HTTP_AUTHORIZATION=f'Bearer {issue_access_token(user.id)}')
|
||||
|
||||
@@ -276,7 +276,7 @@ class QuestionFocusTests(TestCase):
|
||||
type='multiple_choice', prompt='۲ به توان منفی ۳؟')
|
||||
self.right = Choice.objects.create(question=self.question, value='1/8', is_correct=True)
|
||||
self.wrong = Choice.objects.create(question=self.question, value='-8', is_correct=False)
|
||||
user = User.objects.create(phone='09120000905', is_guest=False, grade_id=grade.id)
|
||||
user = User.objects.create(phone='09120000905', grade_id=grade.id)
|
||||
self.client = APIClient()
|
||||
self.client.credentials(HTTP_AUTHORIZATION=f'Bearer {issue_access_token(user.id)}')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user