summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r--tests/postgres_tests/test_operations.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/postgres_tests/test_operations.py b/tests/postgres_tests/test_operations.py
index f344d4ae74..322f38148b 100644
--- a/tests/postgres_tests/test_operations.py
+++ b/tests/postgres_tests/test_operations.py
@@ -318,7 +318,7 @@ class CreateExtensionTests(PostgreSQLTestCase):
@unittest.skipUnless(connection.vendor == "postgresql", "PostgreSQL specific tests.")
-class CreateCollationTests(PostgreSQLTestCase):
+class CreateCollationTests(OptimizerTestBase, PostgreSQLTestCase):
app_label = "test_allow_create_collation"
@override_settings(DATABASE_ROUTERS=[NoMigrationRouter()])
@@ -459,6 +459,24 @@ class CreateCollationTests(PostgreSQLTestCase):
"),",
)
+ def test_reduce_create_remove(self):
+ self.assertOptimizesTo(
+ [
+ CreateCollation(
+ "sample_collation",
+ "und-u-ks-level2",
+ provider="icu",
+ deterministic=False,
+ ),
+ RemoveCollation(
+ "sample_collation",
+ # Different locale
+ "de-u-ks-level1",
+ ),
+ ],
+ [],
+ )
+
@unittest.skipUnless(connection.vendor == "postgresql", "PostgreSQL specific tests.")
class RemoveCollationTests(PostgreSQLTestCase):