mirror of
https://github.com/Hopiu/django.git
synced 2026-04-29 11:14:46 +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()
|