mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
This commit is contained in:
parent
70ec4d776e
commit
210d0489c5
84 changed files with 287 additions and 189 deletions
|
@ -16,6 +16,7 @@ from django.core.exceptions import ImproperlyConfigured
|
|||
from django.forms.models import BaseModelFormSet
|
||||
from django.forms.widgets import Select
|
||||
from django.test import TestCase
|
||||
from django.utils.deprecation import RemovedInDjango19Warning
|
||||
|
||||
from .models import Band, Concert, ValidationTestModel, ValidationTestInlineModel
|
||||
|
||||
|
@ -1479,7 +1480,7 @@ class CustomModelAdminTests(CheckTestCase):
|
|||
def test_deprecation(self):
|
||||
"Deprecated Custom Validator definitions still work with the check framework."
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore", category=PendingDeprecationWarning)
|
||||
warnings.simplefilter("ignore", category=RemovedInDjango19Warning)
|
||||
|
||||
class CustomValidator(ModelAdminValidator):
|
||||
def validate_me(self, model_admin, model):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue