Document tests layout tweaks
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -70,9 +70,17 @@ class DocumentTestMixin(object):
|
||||
self.test_document = document
|
||||
self.test_documents.append(document)
|
||||
self.test_document_page = document.latest_version.pages.first()
|
||||
self.test_document_version = document.latest_version
|
||||
|
||||
|
||||
class DocumentTypeViewTestMixin(object):
|
||||
def _create_document_transformation(self):
|
||||
layer_saved_transformations.add_transformation_to(
|
||||
obj=self.test_document.pages.first(),
|
||||
transformation_class=TEST_TRANSFORMATION_CLASS,
|
||||
arguments=TEST_TRANSFORMATION_ARGUMENT
|
||||
)
|
||||
|
||||
def _request_test_document_type_create_view(self):
|
||||
return self.post(
|
||||
viewname='documents:document_type_create',
|
||||
|
||||
@@ -22,16 +22,9 @@ from .literals import (
|
||||
from .mixins import DocumentViewTestMixin
|
||||
|
||||
|
||||
class DocumentsViewsTestCase(
|
||||
class DocumentViewTestCase(
|
||||
LayerTestMixin, DocumentViewTestMixin, GenericDocumentViewTestCase
|
||||
):
|
||||
def _create_document_transformation(self):
|
||||
layer_saved_transformations.add_transformation_to(
|
||||
obj=self.test_document.pages.first(),
|
||||
transformation_class=TEST_TRANSFORMATION_CLASS,
|
||||
arguments=TEST_TRANSFORMATION_ARGUMENT
|
||||
)
|
||||
|
||||
def test_document_view_no_permissions(self):
|
||||
response = self._request_document_properties_view()
|
||||
self.assertEqual(response.status_code, 404)
|
||||
|
||||
Reference in New Issue
Block a user