'The foreign key widget should only show the "add related" button if the
user has permission to add that related item.'

def testConditionallyShowAddSectionLink(self):

    url = '/test_admin/admin/admin_views/article/add/'
    add_link_text = '    class="add-another"'
    self.client.get('/test_admin/admin/')
    self.client.post('/test_admin/admin/', self.adduser_login)
    response = self.client.get(url)
    self.assertNotContains(response, add_link_text)
    add_user = User.objects.get(username='adduser')
    perm = get_perm(Section, Section._meta.get_add_permission())
    add_user.user_permissions.add(perm)
    response = self.client.get(url)
    self.assertContains(response, add_link_text)
