diff --git a/mayan/apps/document_signatures/tests/test_links.py b/mayan/apps/document_signatures/tests/test_links.py index 77dd7b6060..dbd28f6752 100644 --- a/mayan/apps/document_signatures/tests/test_links.py +++ b/mayan/apps/document_signatures/tests/test_links.py @@ -19,14 +19,16 @@ from .literals import TEST_SIGNATURE_FILE_PATH, TEST_SIGNED_DOCUMENT_PATH class DocumentSignatureLinksTestCase(GenericDocumentViewTestCase): + def setUp(self): + super(DocumentSignaturesTestCase, self).setUp() + self.login_user() + def test_document_version_signature_detail_link_no_permission(self): with open(TEST_SIGNED_DOCUMENT_PATH) as file_object: document = self.document_type.new_document( file_object=file_object ) - self.login_user() - self.add_test_view( test_object=document.latest_version.signatures.first() ) @@ -43,8 +45,6 @@ class DocumentSignatureLinksTestCase(GenericDocumentViewTestCase): file_object=file_object ) - self.login_user() - self.role.permissions.add( permission_document_version_signature_view.stored_permission ) @@ -78,8 +78,6 @@ class DocumentSignatureLinksTestCase(GenericDocumentViewTestCase): signature_file=File(file_object) ) - self.login_user() - self.add_test_view( test_object=document.latest_version.signatures.first() ) @@ -102,8 +100,6 @@ class DocumentSignatureLinksTestCase(GenericDocumentViewTestCase): signature_file=File(file_object) ) - self.login_user() - self.role.permissions.add( permission_document_version_signature_delete.stored_permission )