mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #33308 -- Added support for psycopg version 3.
Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews. Co-authored-by: Florian Apolloner <florian@apolloner.eu> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
parent
d44ee518c4
commit
09ffc5c121
42 changed files with 673 additions and 223 deletions
|
@ -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})")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue