summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_management.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2026-02-06 11:06:17 -0500
committerJacob Walls <jacobtylerwalls@gmail.com>2026-02-10 16:04:24 -0500
commitd007fcf7291cc3c24d4545e23c759bde22b6a8a6 (patch)
tree0ed3491b9e2e0d61694eff2535c99e1eded34b27 /tests/auth_tests/test_management.py
parent64a4d8ad005721b17fafd3399bdf49d7d0f94455 (diff)
Modified tests to format PKs with %s rather than %d.
It's how Django formats values internally and makes tests compatible with databases that use non-integer primary keys.
Diffstat (limited to 'tests/auth_tests/test_management.py')
-rw-r--r--tests/auth_tests/test_management.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auth_tests/test_management.py b/tests/auth_tests/test_management.py
index 0701ac2d68..f5027da4e5 100644
--- a/tests/auth_tests/test_management.py
+++ b/tests/auth_tests/test_management.py
@@ -607,7 +607,7 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
email = Email.objects.create(email="mymail@gmail.com")
Group.objects.all().delete()
nonexistent_group_id = 1
- msg = f"group instance with id {nonexistent_group_id} is not a valid choice."
+ msg = f"group instance with id {nonexistent_group_id!r} is not a valid choice."
with self.assertRaisesMessage(CommandError, msg):
call_command(
@@ -624,7 +624,7 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
email = Email.objects.create(email="mymail@gmail.com")
Group.objects.all().delete()
nonexistent_group_id = 1
- msg = f"group instance with id {nonexistent_group_id} is not a valid choice."
+ msg = f"group instance with id {nonexistent_group_id!r} is not a valid choice."
with mock.patch.dict(
os.environ,
@@ -644,7 +644,7 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
email = Email.objects.create(email="mymail@gmail.com")
Group.objects.all().delete()
nonexistent_group_id = 1
- msg = f"group instance with id {nonexistent_group_id} is not a valid choice."
+ msg = f"group instance with id {nonexistent_group_id!r} is not a valid choice."
@mock_inputs(
{