Model Permissions View Test Cases
Source code in app/api/tests/abstract/api_permissions.py
Attributes
model: object
Item Model to test
app_namespace: str = None
URL namespace
url_name: str
URL name of the view to test
url_view_kwargs: dict = None
URL kwargs of the item page
Functions
test_view_user_anon_denied()
Check correct permission for view
Attempt to view as anon user
Source code in app/api/tests/abstract/api_permissions.py
test_view_no_permission_denied()
Check correct permission for view
Attempt to view with user missing permission
Source code in app/api/tests/abstract/api_permissions.py
test_view_different_organizaiton_denied()
Check correct permission for view
Attempt to view with user from different organization
Source code in app/api/tests/abstract/api_permissions.py
test_view_has_permission()
Check correct permission for view
Attempt to view as user with view permission
Source code in app/api/tests/abstract/api_permissions.py
About:
This page forms part of our Project Centurion ERP.
Page Metadata
Version: ToDo: place files short git commit hereDate Created: 2024-06-15
Date Edited: 2024-07-09
Contribution:
Would You like to contribute to our Centurion ERP project? You can assist in the following ways:
- Edit This Page If there is a mistake or a way you can improve it.
- Add a Page to the Manual if you would like to add an item to our manual
- Raise an Issue if there is something about this page you would like to improve, and git is unfamiliar to you.
ToDo: Add the page list of contributors