diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-01-14 09:33:12 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-01-14 17:50:04 +0100 |
| commit | 7cb5712edc158396c9d4fbf1ecf17794d9a128b3 (patch) | |
| tree | f1f5cc4116140c094311aba6d1a35d8fb8aa26c6 /tests/postgres_tests | |
| parent | 98ae3925e57c3f054814b847971194f7cd8d98d1 (diff) | |
Refs #12990 -- Removed django.contrib.postgres.fields.JSONField per deprecation timeline.
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_json_deprecation.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/postgres_tests/test_json_deprecation.py b/tests/postgres_tests/test_json_deprecation.py index 69dcce3781..7c78c6a864 100644 --- a/tests/postgres_tests/test_json_deprecation.py +++ b/tests/postgres_tests/test_json_deprecation.py @@ -1,35 +1,17 @@ try: from django.contrib.postgres import forms - from django.contrib.postgres.fields import JSONField from django.contrib.postgres.fields.jsonb import ( KeyTextTransform, KeyTransform, ) except ImportError: pass -from django.core.checks import Warning as DjangoWarning from django.utils.deprecation import RemovedInDjango40Warning from . import PostgreSQLSimpleTestCase -from .models import PostgreSQLModel class DeprecationTests(PostgreSQLSimpleTestCase): - def test_model_field_deprecation_message(self): - class PostgreSQLJSONModel(PostgreSQLModel): - field = JSONField() - - self.assertEqual(PostgreSQLJSONModel().check(), [ - DjangoWarning( - 'django.contrib.postgres.fields.JSONField is deprecated. ' - 'Support for it (except in historical migrations) will be ' - 'removed in Django 4.0.', - hint='Use django.db.models.JSONField instead.', - obj=PostgreSQLJSONModel._meta.get_field('field'), - id='fields.W904', - ), - ]) - def test_form_field_deprecation_message(self): msg = ( 'django.contrib.postgres.forms.JSONField is deprecated in favor ' |
