Add keyword arguments to all calls. Rename URL parameters to be
explicit ("key_id"). Add key delete view test. Update tests
to use a mixin for repeated key creation code. Grant permissions
and access the proper way using self.grant_permission and
self.grant_access.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
10 lines
257 B
Python
10 lines
257 B
Python
from ..models import Key
|
|
|
|
from .literals import TEST_KEY_DATA
|
|
|
|
|
|
class KeyTestMixin(object):
|
|
def _create_test_key(self):
|
|
# Creating a Key instance is analogous to importing a key
|
|
self.test_key = Key.objects.create(key_data=TEST_KEY_DATA)
|