'Only admin users should be able to use the admin shortcut view.'

def test_shortcut_view_only_available_to_staff(self):

    user_ctype = ContentType.objects.get_for_model(User)
    user = User.objects.get(username=u'super')
    shortcut_url = (u'/test_admin/admin/r/%s/%s/' % (user_ctype.pk, user.pk))
    response = self.client.get(shortcut_url, follow=False)
    self.assertTemplateUsed(response, u'admin/login.html')
    self.client.login(username=u'super', password=u'secret')
    response = self.client.get(shortcut_url, follow=False)
    self.assertEqual(response.status_code, 302)
    self.assertEqual(response.url, u'http://example.com/users/super/')
