'Can view a shortcut for an Author object that has a get_absolute_url method'

def test_shortcut_with_absolute_url(self):

    for obj in Author.objects.all():
        short_url = (u'/shortcut/%s/%s/' % (ContentType.objects.get_for_model(Author).id, obj.pk))
        response = self.client.get(short_url)
        self.assertRedirects(response, (u'http://testserver%s' % obj.get_absolute_url()), status_code=302, target_status_code=404)
