summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
diff options
context:
space:
mode:
authorAnders Kaseorg <andersk@mit.edu>2022-02-23 11:41:37 -0800
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-24 09:03:58 +0100
commit7f4fc5cbd4c26e137a1abdd9bd603804ddc0e769 (patch)
tree22e9b5943fcc43d4f57c341cbc9968173aa98b63 /tests/postgres_tests
parent981615c6b55bdd2860c6281d4521627de90274dd (diff)
Fixed #33539 -- Fixed spaces in WITH SQL for indexes on PostgreSQL.
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r--tests/postgres_tests/test_indexes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_indexes.py b/tests/postgres_tests/test_indexes.py
index 100e570092..2f74203e8b 100644
--- a/tests/postgres_tests/test_indexes.py
+++ b/tests/postgres_tests/test_indexes.py
@@ -330,9 +330,14 @@ class SchemaTests(PostgreSQLTestCase):
name=index_name,
fastupdate=True,
gin_pending_list_limit=64,
+ db_tablespace="pg_default",
)
with connection.schema_editor() as editor:
editor.add_index(IntegerArrayModel, index)
+ self.assertIn(
+ ") WITH (gin_pending_list_limit = 64, fastupdate = on) TABLESPACE",
+ str(index.create_sql(IntegerArrayModel, editor)),
+ )
constraints = self.get_constraints(IntegerArrayModel._meta.db_table)
self.assertEqual(constraints[index_name]["type"], "gin")
self.assertEqual(