From bf3a782396b14f55daf4705ec59a6bb779354e1b Mon Sep 17 00:00:00 2001 From: Mahdi Rahimi <31624047+mahdirahimi1999@users.noreply.github.com> Date: Fri, 8 Aug 2025 00:00:35 +0330 Subject: [PATCH] Update tests/test_authtoken.py Co-authored-by: Bruno Alla --- tests/test_authtoken.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/test_authtoken.py b/tests/test_authtoken.py index 478777a9f..58b256c84 100644 --- a/tests/test_authtoken.py +++ b/tests/test_authtoken.py @@ -58,12 +58,7 @@ class AuthTokenTests(TestCase): with self.assertRaises(IntegrityError): Token.objects.create(key=existing_token.key, user=self.user) - def test_key_regeneration_on_save_is_not_a_breaking_change(self): - """ - Verify that when a token is created without a key, it generates one correctly. - This tests the backward compatibility scenario where existing code might - create tokens without explicitly setting a key. - """ + def test_key_regeneration_on_save_when_cleared(self): # Create a new user for this test to avoid conflicts with setUp token user2 = User.objects.create_user('test_user2', 'test2@example.com', 'password')