summaryrefslogtreecommitdiff
path: root/tests/admin_checks
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-01-18 14:43:21 -0500
committerTim Graham <timograham@gmail.com>2015-01-18 14:43:21 -0500
commit67a76500a56d6dbe970126e142e02254dad7dbf3 (patch)
tree0356f45a58db30ad2cbc36acdb36090ce10e256e /tests/admin_checks
parent5fb582d952673067046de0d0ddf37b45675655db (diff)
downloaddjango-67a76500a56d6dbe970126e142e02254dad7dbf3.tar.gz
Removed support for admin validators per deprecation timeline; refs #16905.
Diffstat (limited to 'tests/admin_checks')
-rw-r--r--tests/admin_checks/tests.py23
1 files changed, 1 insertions, 22 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py
index ea0151cced..4f5bd5e48a 100644
--- a/tests/admin_checks/tests.py
+++ b/tests/admin_checks/tests.py
@@ -4,8 +4,7 @@ from django import forms
from django.contrib import admin
from django.contrib.contenttypes.admin import GenericStackedInline
from django.core import checks
-from django.core.exceptions import ImproperlyConfigured
-from django.test import TestCase, ignore_warnings, override_settings
+from django.test import TestCase, override_settings
from .models import Song, Book, Album, TwoAlbumFKAndAnE, City, State, Influence
@@ -635,26 +634,6 @@ class SystemChecksTestCase(TestCase):
errors = FieldsOnFormOnlyAdmin.check(model=Song)
self.assertEqual(errors, [])
- @ignore_warnings(module='django.contrib.admin.options')
- def test_validator_compatibility(self):
- class MyValidator(object):
- def validate(self, cls, model):
- raise ImproperlyConfigured("error!")
-
- class MyModelAdmin(admin.ModelAdmin):
- validator_class = MyValidator
-
- errors = MyModelAdmin.check(model=Song)
-
- expected = [
- checks.Error(
- 'error!',
- hint=None,
- obj=MyModelAdmin,
- )
- ]
- self.assertEqual(errors, expected)
-
def test_check_sublists_for_duplicates(self):
class MyModelAdmin(admin.ModelAdmin):
fields = ['state', ['state']]