mirror of
https://github.com/django/django.git
synced 2025-02-20 22:34:31 +00:00
19 lines
530 B
Python
19 lines
530 B
Python
try:
|
|
from django.contrib.postgres import forms
|
|
except ImportError:
|
|
pass
|
|
|
|
from django.utils.deprecation import RemovedInDjango40Warning
|
|
|
|
from . import PostgreSQLSimpleTestCase
|
|
|
|
|
|
class DeprecationTests(PostgreSQLSimpleTestCase):
|
|
def test_form_field_deprecation_message(self):
|
|
msg = (
|
|
'django.contrib.postgres.forms.JSONField is deprecated in favor '
|
|
'of django.forms.JSONField.'
|
|
)
|
|
with self.assertWarnsMessage(RemovedInDjango40Warning, msg):
|
|
forms.JSONField()
|