summaryrefslogtreecommitdiff
path: root/tests/schema
diff options
context:
space:
mode:
Diffstat (limited to 'tests/schema')
-rw-r--r--tests/schema/test_logging.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/schema/test_logging.py b/tests/schema/test_logging.py
index 2821e5f406..9c7069c874 100644
--- a/tests/schema/test_logging.py
+++ b/tests/schema/test_logging.py
@@ -9,9 +9,9 @@ class SchemaLoggerTests(TestCase):
params = [42, 1337]
with self.assertLogs("django.db.backends.schema", "DEBUG") as cm:
editor.execute(sql, params)
+ if connection.features.schema_editor_uses_clientside_param_binding:
+ sql = "SELECT * FROM foo WHERE id in (42, 1337)"
+ params = None
self.assertEqual(cm.records[0].sql, sql)
self.assertEqual(cm.records[0].params, params)
- self.assertEqual(
- cm.records[0].getMessage(),
- "SELECT * FROM foo WHERE id in (%s, %s); (params [42, 1337])",
- )
+ self.assertEqual(cm.records[0].getMessage(), f"{sql}; (params {params})")