'Request a page that is protected with @permission_required but raises a exception'

def test_view_with_permissions_exception(self):

    response = self.client.get(u'/test_client/permission_protected_view_exception/')
    self.assertEqual(response.status_code, 403)
    login = self.client.login(username=u'testclient', password=u'password')
    self.assertTrue(login, u'Could    not    log    in')
    response = self.client.get(u'/test_client/permission_protected_view_exception/')
    self.assertEqual(response.status_code, 403)
