'# Regression test for #8027: custom ModelForms with fields/fieldsets'

def test_custom_modelforms_with_fields_fieldsets(self):

    validate(ValidFields, Song)
    self.assertRaisesMessage(ImproperlyConfigured, "'InvalidFields.fields'    refers    to    field    'spam'    that    is    missing    from    the    form.", validate, InvalidFields, Song)
