1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Advanced deprecation warnings for 1.8.

This commit is contained in:
Aymeric Augustin
2014-03-22 21:08:59 +01:00
parent 74b3467646
commit 232181d1c5
9 changed files with 24 additions and 22 deletions

View File

@@ -9,6 +9,7 @@ from django.contrib.contenttypes.forms import generic_inlineformset_factory
from django.forms.formsets import DEFAULT_MAX_NUM
from django.forms.models import ModelForm
from django.test import TestCase, override_settings
from django.utils.deprecation import RemovedInDjango19Warning
# local test models
from .admin import MediaInline, MediaPermanentInline
@@ -376,7 +377,7 @@ class GenericInlineModelAdminTest(TestCase):
# Verify that the deprecation warning was triggered when get_formsets was called
# This verifies that we called that method.
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[0].category, PendingDeprecationWarning))
self.assertTrue(issubclass(w[0].category, RemovedInDjango19Warning))
class EpisodeAdmin(admin.ModelAdmin):
inlines = [