diff options
Diffstat (limited to 'tests/model_forms')
-rw-r--r-- | tests/model_forms/tests.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index c75921c6e3..e651ddae7d 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -13,8 +13,9 @@ from django.core.validators import ValidationError from django.db import connection from django.db.models.query import EmptyQuerySet from django.forms.models import model_to_dict -from django.utils._os import upath from django.test import TestCase, skipUnlessDBFeature +from django.utils.deprecation import RemovedInDjango18Warning +from django.utils._os import upath from django.utils import six from .models import (Article, ArticleStatus, BetterWriter, BigInt, Book, @@ -265,7 +266,7 @@ class ModelFormBaseTest(TestCase): def test_missing_fields_attribute(self): with warnings.catch_warnings(record=True): - warnings.simplefilter("always", DeprecationWarning) + warnings.simplefilter("always", RemovedInDjango18Warning) class MissingFieldsForm(forms.ModelForm): class Meta: @@ -275,7 +276,7 @@ class ModelFormBaseTest(TestCase): # if a warning has been seen already, the catch_warnings won't # have recorded it. The following line therefore will not work reliably: - # self.assertEqual(w[0].category, DeprecationWarning) + # self.assertEqual(w[0].category, RemovedInDjango18Warning) # Until end of the deprecation cycle, should still create the # form as before: |