Files
mayan-edms/mayan/apps/django_gpg/tests/mixins.py
Roberto Rosario fc29309f68 Update Django GPG app
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>
2019-01-20 18:08:47 -04:00

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)