mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Further removal of static admin validation that can fail erroneously
This commit is contained in:
@@ -682,27 +682,6 @@ class ValidationTests(unittest.TestCase):
|
||||
|
||||
validate(BandAdmin, Band)
|
||||
|
||||
class AdminBandForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Band
|
||||
|
||||
class BandAdmin(ModelAdmin):
|
||||
form = AdminBandForm
|
||||
|
||||
fieldsets = (
|
||||
('Band', {
|
||||
'fields': ('non_existent_field',)
|
||||
}),
|
||||
)
|
||||
|
||||
six.assertRaisesRegex(self,
|
||||
ImproperlyConfigured,
|
||||
"'BandAdmin.fieldsets\[0]\[1\]\['fields'\]' refers to field 'non_existent_field' that is missing from the form.",
|
||||
validate,
|
||||
BandAdmin,
|
||||
Band,
|
||||
)
|
||||
|
||||
class AdminBandForm(forms.ModelForm):
|
||||
delete = forms.BooleanField()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user