Backport test case improvements
Add random primary key mixin. Split test case code into mixins. Make the view test case and the API test cases part of the same class hierachy. Update tests that failed due to the new import locations. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
8
mayan/apps/permissions/tests/mixins.py
Normal file
8
mayan/apps/permissions/tests/mixins.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
class RoleTestCaseMixin(object):
|
||||
def grant_permission(self, permission):
|
||||
self.role.permissions.add(
|
||||
permission.stored_permission
|
||||
)
|
||||
Reference in New Issue
Block a user