summaryrefslogtreecommitdiff
path: root/tests/invalid_models_tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-09-13 14:03:45 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-09-18 22:12:40 +0200
commit04eb1b4567c96ccb167c16a95ca12c336b0c791b (patch)
tree994b6e77374e28c9e0915c41fec71b4f125773ee /tests/invalid_models_tests
parent6e4e5523a8f40b63f3e74889266a7d638f6364dc (diff)
Refs #33872 -- Removed django.contrib.postgres.fields.CIText/CICharField/CIEmailField/CITextField.
Per deprecation timeline.
Diffstat (limited to 'tests/invalid_models_tests')
-rw-r--r--tests/invalid_models_tests/test_deprecated_fields.py38
1 files changed, 17 insertions, 21 deletions
diff --git a/tests/invalid_models_tests/test_deprecated_fields.py b/tests/invalid_models_tests/test_deprecated_fields.py
index 429e15febc..65f65e7528 100644
--- a/tests/invalid_models_tests/test_deprecated_fields.py
+++ b/tests/invalid_models_tests/test_deprecated_fields.py
@@ -104,46 +104,42 @@ class DeprecatedFieldsTests(SimpleTestCase):
self.assertEqual(
PostgresCIFieldsModel.check(),
[
- checks.Warning(
- "django.contrib.postgres.fields.CICharField is deprecated. Support "
- "for it (except in historical migrations) will be removed in "
- "Django 5.1.",
+ checks.Error(
+ "django.contrib.postgres.fields.CICharField is removed except for "
+ "support in historical migrations.",
hint=(
'Use CharField(db_collation="…") with a case-insensitive '
"non-deterministic collation instead."
),
obj=PostgresCIFieldsModel._meta.get_field("ci_char"),
- id="fields.W905",
+ id="fields.E905",
),
- checks.Warning(
- "django.contrib.postgres.fields.CIEmailField is deprecated. "
- "Support for it (except in historical migrations) will be removed "
- "in Django 5.1.",
+ checks.Error(
+ "django.contrib.postgres.fields.CIEmailField is removed except for "
+ "support in historical migrations.",
hint=(
'Use EmailField(db_collation="…") with a case-insensitive '
"non-deterministic collation instead."
),
obj=PostgresCIFieldsModel._meta.get_field("ci_email"),
- id="fields.W906",
+ id="fields.E906",
),
- checks.Warning(
- "django.contrib.postgres.fields.CITextField is deprecated. Support "
- "for it (except in historical migrations) will be removed in "
- "Django 5.1.",
+ checks.Error(
+ "django.contrib.postgres.fields.CITextField is removed except for "
+ "support in historical migrations.",
hint=(
'Use TextField(db_collation="…") with a case-insensitive '
"non-deterministic collation instead."
),
obj=PostgresCIFieldsModel._meta.get_field("ci_text"),
- id="fields.W907",
+ id="fields.E907",
),
- checks.Warning(
- "Base field for array has warnings:\n"
- " django.contrib.postgres.fields.CITextField is deprecated. "
- "Support for it (except in historical migrations) will be removed "
- "in Django 5.1. (fields.W907)",
+ checks.Error(
+ "Base field for array has errors:\n"
+ " django.contrib.postgres.fields.CITextField is removed except "
+ "for support in historical migrations. (fields.E907)",
obj=PostgresCIFieldsModel._meta.get_field("array_ci_text"),
- id="postgres.W004",
+ id="postgres.E001",
),
],
)