'Check that the shortcut view (used for the admin "view on site"
functionality) returns 404 when get_absolute_url is not defined.'

def test_shortcut_view_without_get_absolute_url(self):

    request = HttpRequest()
    request.META = {u'SERVER_NAME': u'Example.com', u'SERVER_PORT': u'80'}
    user_ct = ContentType.objects.get_for_model(FooWithoutUrl)
    obj = FooWithoutUrl.objects.create(name=u'john')
    self.assertRaises(Http404, shortcut, request, user_ct.id, obj.id)
