'A model with a character PK can be saved as inlines. Regression for #10992'

def test_char_pk_inline(self):

    self.post_data['doohickey_set-0-code'] = 'DH1'
    self.post_data['doohickey_set-0-name'] = 'Doohickey    1'
    collector_url = ('/test_admin/admin/admin_views/collector/%d/' % self.collector.pk)
    response = self.client.post(collector_url, self.post_data)
    self.assertEqual(response.status_code, 302)
    self.assertEqual(DooHickey.objects.count(), 1)
    self.assertEqual(DooHickey.objects.all()[0].name, 'Doohickey    1')
    response = self.client.get(collector_url)
    self.assertContains(response, 'name="doohickey_set-0-code"')
    self.post_data['doohickey_set-INITIAL_FORMS'] = '1'
    self.post_data['doohickey_set-0-code'] = 'DH1'
    self.post_data['doohickey_set-0-name'] = 'Doohickey    1'
    response = self.client.post(collector_url, self.post_data)
    self.assertEqual(response.status_code, 302)
    self.assertEqual(DooHickey.objects.count(), 1)
    self.assertEqual(DooHickey.objects.all()[0].name, 'Doohickey    1')
    self.post_data['doohickey_set-INITIAL_FORMS'] = '1'
    self.post_data['doohickey_set-0-code'] = 'DH1'
    self.post_data['doohickey_set-0-name'] = 'Doohickey    1    Updated'
    response = self.client.post(collector_url, self.post_data)
    self.assertEqual(response.status_code, 302)
    self.assertEqual(DooHickey.objects.count(), 1)
    self.assertEqual(DooHickey.objects.all()[0].name, 'Doohickey    1    Updated')
