'Ensure that the `exclude` kwarg passed to `ModelAdmin.get_form()`
overrides all other declarations. Refs #8999.'

def test_form_exclude_kwarg_override(self):

    class AdminBandForm(forms.ModelForm, ):
        class Meta:
            model = Band
            exclude = [u'name']
    class BandAdmin(ModelAdmin, ):
        exclude = [u'sign_date']
        form = AdminBandForm
        def get_form(self, request, obj=None, **kwargs):
            kwargs[u'exclude'] = [u'bio']
            return super(BandAdmin, self).get_form(request, obj, **kwargs)
    ma = BandAdmin(Band, self.site)
    self.assertEqual(list(ma.get_form(request).base_fields), [u'name', u'sign_date'])
