From db7bb3b64e469fbb5c79e7b5b2fcb890434aa60f Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Mon, 12 Dec 2022 09:54:49 +0100 Subject: Refs #33308 -- Added DatabaseOperations.compose_sql() on PostgreSQL. --- tests/inspectdb/tests.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py index 66b2eb8260..7944e5f221 100644 --- a/tests/inspectdb/tests.py +++ b/tests/inspectdb/tests.py @@ -563,17 +563,19 @@ class InspectDBTransactionalTests(TransactionTestCase): "CREATE SERVER inspectdb_server FOREIGN DATA WRAPPER file_fdw" ) cursor.execute( - """\ - CREATE FOREIGN TABLE inspectdb_iris_foreign_table ( - petal_length real, - petal_width real, - sepal_length real, - sepal_width real - ) SERVER inspectdb_server OPTIONS ( - filename %s + connection.ops.compose_sql( + """ + CREATE FOREIGN TABLE inspectdb_iris_foreign_table ( + petal_length real, + petal_width real, + sepal_length real, + sepal_width real + ) SERVER inspectdb_server OPTIONS ( + filename %s + ) + """, + [os.devnull], ) - """, - [os.devnull], ) out = StringIO() foreign_table_model = "class InspectdbIrisForeignTable(models.Model):" -- cgit v1.3