summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad A. Hussein <ahmadahussein0@gmail.com>2020-06-23 15:04:38 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-06-23 21:00:09 +0200
commitac0ff7d7001bdf2c6669857ea184656d097bd603 (patch)
tree7eed1e1c13f33d4b054e429b07dccd69af914f51
parent648f6ffcd700de4990957c84000484f066b9edb2 (diff)
[3.1.x] Fixed #31736 -- Fixed InspectDBTransactionalTests.test_foreign_data_wrapper crash on Windows.
Backport of 798835112d81b852efaae0e067af389c733cd1b3 from master
-rw-r--r--tests/inspectdb/tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py
index 910082510a..98cd73096f 100644
--- a/tests/inspectdb/tests.py
+++ b/tests/inspectdb/tests.py
@@ -1,3 +1,4 @@
+import os
import re
from io import StringIO
from unittest import mock, skipUnless
@@ -397,9 +398,9 @@ class InspectDBTransactionalTests(TransactionTestCase):
sepal_length real,
sepal_width real
) SERVER inspectdb_server OPTIONS (
- filename '/dev/null'
+ filename %s
)
- ''')
+ ''', [os.devnull])
out = StringIO()
foreign_table_model = 'class InspectdbIrisForeignTable(models.Model):'
foreign_table_managed = 'managed = False'