'Test for #17927 Initial values support for BaseGenericInlineFormSet.'

def test_generic_inline_formsets_initial(self):

    quartz = Mineral.objects.create(name=u'Quartz', hardness=7)
    GenericFormSet = generic_inlineformset_factory(TaggedItem, extra=1)
    ctype = ContentType.objects.get_for_model(quartz)
    initial_data = [{u'tag': u'lizard', u'content_type': ctype.pk, u'object_id': quartz.pk}]
    formset = GenericFormSet(initial=initial_data)
    self.assertEqual(formset.forms[0].initial, initial_data[0])
