diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-05-19 09:26:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-19 09:26:48 +0200 |
| commit | 981c23c0ccbcaa155a80f894fd9e832beaab661d (patch) | |
| tree | e74d0d4ef436c10bbd426d8197f8486e551f2144 /tests/postgres_tests/test_operations.py | |
| parent | 9f5548952906c6ea97200c016734b4f519520a64 (diff) | |
Fixed #33717 -- Dropped support for PostgreSQL 11.
Diffstat (limited to 'tests/postgres_tests/test_operations.py')
| -rw-r--r-- | tests/postgres_tests/test_operations.py | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/tests/postgres_tests/test_operations.py b/tests/postgres_tests/test_operations.py index a54f8811ba..f395198533 100644 --- a/tests/postgres_tests/test_operations.py +++ b/tests/postgres_tests/test_operations.py @@ -1,5 +1,4 @@ import unittest -from unittest import mock from migrations.test_base import OperationTestBase @@ -7,7 +6,7 @@ from django.db import IntegrityError, NotSupportedError, connection, transaction from django.db.migrations.state import ProjectState from django.db.models import CheckConstraint, Index, Q, UniqueConstraint from django.db.utils import ProgrammingError -from django.test import modify_settings, override_settings, skipUnlessDBFeature +from django.test import modify_settings, override_settings from django.test.utils import CaptureQueriesContext from . import PostgreSQLTestCase @@ -318,7 +317,6 @@ class CreateCollationTests(PostgreSQLTestCase): self.assertEqual(args, []) self.assertEqual(kwargs, {"name": "C_test", "locale": "C"}) - @skipUnlessDBFeature("supports_non_deterministic_collations") def test_create_non_deterministic_collation(self): operation = CreateCollation( "case_insensitive_test", @@ -383,27 +381,6 @@ class CreateCollationTests(PostgreSQLTestCase): self.assertEqual(len(captured_queries), 1) self.assertIn("DROP COLLATION", captured_queries[0]["sql"]) - def test_nondeterministic_collation_not_supported(self): - operation = CreateCollation( - "case_insensitive_test", - provider="icu", - locale="und-u-ks-level2", - deterministic=False, - ) - project_state = ProjectState() - new_state = project_state.clone() - msg = "Non-deterministic collations require PostgreSQL 12+." - with connection.schema_editor(atomic=False) as editor: - with mock.patch( - "django.db.backends.postgresql.features.DatabaseFeatures." - "supports_non_deterministic_collations", - False, - ): - with self.assertRaisesMessage(NotSupportedError, msg): - operation.database_forwards( - self.app_label, editor, project_state, new_state - ) - @unittest.skipUnless(connection.vendor == "postgresql", "PostgreSQL specific tests.") class RemoveCollationTests(PostgreSQLTestCase): |
