'A model with an integer PK can be saved as inlines. Regression for #10992'

def test_integer_pk_inline(self):

    self.post_data[u'whatsit_set-0-index'] = u'42'
    self.post_data[u'whatsit_set-0-name'] = u'Whatsit    1'
    response = self.client.post(u'/test_admin/admin/admin_views/collector/1/', self.post_data)
    self.assertEqual(response.status_code, 302)
    self.assertEqual(Whatsit.objects.count(), 1)
    self.assertEqual(Whatsit.objects.all()[0].name, u'Whatsit    1')
    response = self.client.get(u'/test_admin/admin/admin_views/collector/1/')
    self.assertContains(response, u'name="whatsit_set-0-index"')
    self.post_data[u'whatsit_set-INITIAL_FORMS'] = u'1'
    self.post_data[u'whatsit_set-0-index'] = u'42'
    self.post_data[u'whatsit_set-0-name'] = u'Whatsit    1'
    response = self.client.post(u'/test_admin/admin/admin_views/collector/1/', self.post_data)
    self.assertEqual(response.status_code, 302)
    self.assertEqual(Whatsit.objects.count(), 1)
    self.assertEqual(Whatsit.objects.all()[0].name, u'Whatsit    1')
    self.post_data[u'whatsit_set-INITIAL_FORMS'] = u'1'
    self.post_data[u'whatsit_set-0-index'] = u'42'
    self.post_data[u'whatsit_set-0-name'] = u'Whatsit    1    Updated'
    response = self.client.post(u'/test_admin/admin/admin_views/collector/1/', self.post_data)
    self.assertEqual(response.status_code, 302)
    self.assertEqual(Whatsit.objects.count(), 1)
    self.assertEqual(Whatsit.objects.all()[0].name, u'Whatsit    1    Updated')
