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/model_forms/test_modelchoicefield.py | 12 ++++++------ tests/model_forms/tests.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tests/model_forms') diff --git a/tests/model_forms/test_modelchoicefield.py b/tests/model_forms/test_modelchoicefield.py index 7b086fb182..7f66b5b078 100644 --- a/tests/model_forms/test_modelchoicefield.py +++ b/tests/model_forms/test_modelchoicefield.py @@ -347,11 +347,11 @@ class ModelChoiceFieldTests(TestCase): field.widget.render("name", []), ( "
" - '
' - '
' - '
' "
" ) @@ -393,14 +393,14 @@ class ModelChoiceFieldTests(TestCase): field.widget.render("name", []), """
-
""" % (self.c1.pk, self.c2.pk, self.c3.pk), ) diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index 466674ef64..3d4eb06cf4 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -1650,9 +1650,9 @@ class ModelFormBasicTests(TestCase):
  • """ % (self.c1.pk, self.c2.pk, self.c3.pk), ) -- cgit v1.3