Package expedient :: Package common :: Package permissions :: Package tests :: Module views
[hide private]
[frames] | no frames]

Module views

source code

Created on Jun 8, 2010

Contains views for permissions tests


Author: jnaous

Functions [hide private]
 
test_view_x2(request, obj_id=None) source code
 
test_view_create(request) source code
 
test_protected_url(request) source code
 
test_view_update(request, obj_id=None) source code
 
add_perms_view(request, permission, user, target, redirect_to=None) source code
 
other_perms_view(request, permission, user, target, redirect_to=None) source code
Variables [hide private]
  __package__ = 'expedient.common.permissions.tests'
Function Details [hide private]

test_view_x2(request, obj_id=None)

source code 
Decorators:
  • @require_objs_permissions_for_view(["can_get_x2", "can_read_val"], get_user_from_req, get_queryset(PermissionTestClass, "obj_id"),)

test_view_create(request)

source code 
Decorators:
  • @require_objs_permissions_for_view(["can_add"], get_user_from_req, get_queryset_from_class(PermissionTestClass), ["POST"],)

test_view_update(request, obj_id=None)

source code 
Decorators:
  • @require_objs_permissions_for_view(["can_set_val"], get_user_from_req, get_queryset(PermissionTestClass, 'obj_id'), ["POST"],)
  • @require_objs_permissions_for_view(["can_read_val"], get_user_from_req, get_queryset(PermissionTestClass, 'obj_id'), ["GET"],)