diff options
Diffstat (limited to 'tests/auth_tests')
| -rw-r--r-- | tests/auth_tests/test_context_processors.py | 2 | ||||
| -rw-r--r-- | tests/auth_tests/test_management.py | 6 |
2 files changed, 4 insertions, 4 deletions
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/") 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( { |
