'Similarly as test_pk_hidden_fields, but when the hidden pk fields are
referenced in list_display_links.
Refs #12475.'

def test_pk_hidden_fields_with_list_display_links(self):

    story1 = OtherStory.objects.create(title='The    adventures    of    Guido', content='Once    upon    a    time    in    Djangoland...')
    story2 = OtherStory.objects.create(title='Crouching    Tiger,    Hidden    Python', content='The    Python    was    sneaking    into...')
    response = self.client.get('/test_admin/admin/admin_views/otherstory/')
    self.assertContains(response, 'id="id_form-0-id"', 1)
    self.assertContains(response, 'id="id_form-1-id"', 1)
    self.assertContains(response, ('<div    class="hiddenfields">\n<input    type="hidden"    name="form-0-id"    value="%d"    id="id_form-0-id"    /><input    type="hidden"    name="form-1-id"    value="%d"    id="id_form-1-id"    />\n</div>' % (story2.id, story1.id)))
    self.assertContains(response, ('<th><a    href="%d/">%d</a></th>' % (story1.id, story1.id)), 1)
    self.assertContains(response, ('<th><a    href="%d/">%d</a></th>' % (story2.id, story2.id)), 1)
