'Ensure that `obj` is passed from `InlineModelAdmin.get_fieldsets()` to
`InlineModelAdmin.get_formset()`.'

def test_regression_for_ticket_15820(self):

    class CustomConcertForm(forms.ModelForm, ):
        class Meta:
            model = Concert
            fields = [u'day']
    class ConcertInline(TabularInline, ):
        model = Concert
        fk_name = u'main_band'
        def get_formset(self, request, obj=None, **kwargs):
            if obj:
                kwargs[u'form'] = CustomConcertForm
            return super(ConcertInline, self).get_formset(request, obj, **kwargs)
    class BandAdmin(ModelAdmin, ):
        inlines = [ConcertInline]
    concert = Concert.objects.create(main_band=self.band, opening_band=self.band, day=1)
    ma = BandAdmin(Band, self.site)
    inline_instances = ma.get_inline_instances(request)
    fieldsets = list(inline_instances[0].get_fieldsets(request))
    self.assertEqual(fieldsets[0][1][u'fields'], [u'main_band', u'opening_band', u'day', u'transport'])
    fieldsets = list(inline_instances[0].get_fieldsets(request, inline_instances[0].model))
    self.assertEqual(fieldsets[0][1][u'fields'], [u'day'])
