Set the proper expected response content type in the document download views tests.

This commit is contained in:
Roberto Rosario
2016-10-21 04:27:41 -04:00
parent 89af7e9f12
commit bf29846b54

View File

@@ -247,6 +247,9 @@ class DocumentsViewsTestCase(GenericDocumentViewTestCase):
permission_document_download.stored_permission
)
# Set the expected_content_type for common.tests.mixins.ContentTypeCheckMixin
self.expected_content_type = self.document.file_mimetype
response = self.post(
'documents:document_download', args=(self.document.pk,)
)
@@ -284,6 +287,9 @@ class DocumentsViewsTestCase(GenericDocumentViewTestCase):
permission_document_download.stored_permission
)
# Set the expected_content_type for common.tests.mixins.ContentTypeCheckMixin
self.expected_content_type = self.document.file_mimetype
response = self.post(
'documents:document_multiple_download',
data={'id_list': self.document.pk}
@@ -323,6 +329,9 @@ class DocumentsViewsTestCase(GenericDocumentViewTestCase):
permission_document_download.stored_permission
)
# Set the expected_content_type for common.tests.mixins.ContentTypeCheckMixin
self.expected_content_type = self.document.file_mimetype
response = self.post(
'documents:document_version_download', args=(
self.document.latest_version.pk,