1
0
mirror of https://github.com/django/django.git synced 2025-08-11 04:19:11 +00:00

Refs #34381 -- Fixed InspectDBTransactionalTests.test_foreign_data_wrapper() on Windows.

This commit is contained in:
David Smith 2023-03-05 13:37:03 +00:00 committed by Mariusz Felisiak
parent c914d6cff1
commit 507bc13648

View File

@ -1,4 +1,3 @@
import os
import re import re
from io import StringIO from io import StringIO
from unittest import mock, skipUnless from unittest import mock, skipUnless
@ -588,19 +587,17 @@ class InspectDBTransactionalTests(TransactionTestCase):
"CREATE SERVER inspectdb_server FOREIGN DATA WRAPPER file_fdw" "CREATE SERVER inspectdb_server FOREIGN DATA WRAPPER file_fdw"
) )
cursor.execute( cursor.execute(
connection.ops.compose_sql( """
""" CREATE FOREIGN TABLE inspectdb_iris_foreign_table (
CREATE FOREIGN TABLE inspectdb_iris_foreign_table ( petal_length real,
petal_length real, petal_width real,
petal_width real, sepal_length real,
sepal_length real, sepal_width real
sepal_width real ) SERVER inspectdb_server OPTIONS (
) SERVER inspectdb_server OPTIONS ( program 'echo 1,2,3,4',
filename %s format 'csv'
)
""",
[os.devnull],
) )
"""
) )
out = StringIO() out = StringIO()
foreign_table_model = "class InspectdbIrisForeignTable(models.Model):" foreign_table_model = "class InspectdbIrisForeignTable(models.Model):"