mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #15669 -- Included app label in admin validation messages. Thanks, lamby and Jure Cuhalev.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16462 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -92,10 +92,22 @@ class ValidationTestCase(TestCase):
|
||||
inlines = [SongInline]
|
||||
|
||||
self.assertRaisesMessage(ImproperlyConfigured,
|
||||
"SongInline cannot exclude the field 'album' - this is the foreign key to the parent model Album.",
|
||||
"SongInline cannot exclude the field 'album' - this is the foreign key to the parent model admin_validation.Album.",
|
||||
validate,
|
||||
AlbumAdmin, Album)
|
||||
|
||||
def test_app_label_in_admin_validation(self):
|
||||
"""
|
||||
Regression test for #15669 - Include app label in admin validation messages
|
||||
"""
|
||||
class RawIdNonexistingAdmin(admin.ModelAdmin):
|
||||
raw_id_fields = ('nonexisting',)
|
||||
|
||||
self.assertRaisesMessage(ImproperlyConfigured,
|
||||
"'RawIdNonexistingAdmin.raw_id_fields' refers to field 'nonexisting' that is missing from model 'admin_validation.Album'.",
|
||||
validate,
|
||||
RawIdNonexistingAdmin, Album)
|
||||
|
||||
def test_fk_exclusion(self):
|
||||
"""
|
||||
Regression test for #11709 - when testing for fk excluding (when exclude is
|
||||
|
||||
Reference in New Issue
Block a user