summaryrefslogtreecommitdiff
path: root/tests/modeladmin
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/modeladmin
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/modeladmin')
-rw-r--r--tests/modeladmin/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py
index 4a92514e17..f50a557d02 100644
--- a/tests/modeladmin/tests.py
+++ b/tests/modeladmin/tests.py
@@ -637,8 +637,8 @@ class ModelAdminTests(TestCase):
'<select data-context="available-source" '
'name="main_band" id="id_main_band" required>'
'<option value="" selected>---------</option>'
- '<option value="%d">The Beatles</option>'
- '<option value="%d">The Doors</option>'
+ '<option value="%s">The Beatles</option>'
+ '<option value="%s">The Doors</option>'
"</select></div>" % (band2.id, self.band.id),
)
@@ -661,7 +661,7 @@ class ModelAdminTests(TestCase):
'<select data-context="available-source" '
'name="main_band" id="id_main_band" required>'
'<option value="" selected>---------</option>'
- '<option value="%d">The Doors</option>'
+ '<option value="%s">The Doors</option>'
"</select></div>" % self.band.id,
)