From d007fcf7291cc3c24d4545e23c759bde22b6a8a6 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 6 Feb 2026 11:06:17 -0500 Subject: 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. --- tests/auth_tests/test_context_processors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auth_tests/test_context_processors.py') diff --git a/tests/auth_tests/test_context_processors.py b/tests/auth_tests/test_context_processors.py index cebc1108dc..85b9e6367b 100644 --- a/tests/auth_tests/test_context_processors.py +++ b/tests/auth_tests/test_context_processors.py @@ -140,7 +140,7 @@ class AuthContextProcessorTests(TestCase): user = authenticate(username="super", password="secret") response = self.client.get("/auth_processor_user/") self.assertContains(response, "unicode: super") - self.assertContains(response, "id: %d" % self.superuser.pk) + self.assertContains(response, "id: %s" % self.superuser.pk) self.assertContains(response, "username: super") # bug #12037 is tested by the {% url %} in the template: self.assertContains(response, "url: /userpage/super/") -- cgit v1.3