Refactor and implement download code natively
- Use modified port of Django 2.2 FileResponse. - Remove Django DownloadView library. Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -2,8 +2,6 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from django_downloadview import assert_download_response
|
||||
|
||||
from mayan.apps.acls.tests.mixins import ACLTestCaseMixin
|
||||
from mayan.apps.converter.tests.mixins import LayerTestCaseMixin
|
||||
from mayan.apps.permissions.tests.mixins import PermissionTestCaseMixin
|
||||
@@ -14,7 +12,7 @@ from mayan.apps.user_management.tests.mixins import UserTestMixin
|
||||
|
||||
from .mixins import (
|
||||
ClientMethodsTestCaseMixin, ConnectionsCheckTestCaseMixin,
|
||||
ContentTypeCheckTestCaseMixin, ModelTestCaseMixin,
|
||||
ContentTypeCheckTestCaseMixin, DownloadTestCaseMixin, ModelTestCaseMixin,
|
||||
OpenFileCheckTestCaseMixin, RandomPrimaryKeyModelMonkeyPatchMixin,
|
||||
SilenceLoggerTestCaseMixin, TempfileCheckTestCasekMixin,
|
||||
TestViewTestCaseMixin
|
||||
@@ -22,7 +20,8 @@ from .mixins import (
|
||||
|
||||
|
||||
class BaseTestCase(
|
||||
LayerTestCaseMixin, SilenceLoggerTestCaseMixin, ConnectionsCheckTestCaseMixin,
|
||||
LayerTestCaseMixin, SilenceLoggerTestCaseMixin,
|
||||
ConnectionsCheckTestCaseMixin, DownloadTestCaseMixin,
|
||||
RandomPrimaryKeyModelMonkeyPatchMixin, ACLTestCaseMixin,
|
||||
ModelTestCaseMixin, OpenFileCheckTestCaseMixin, PermissionTestCaseMixin,
|
||||
SmartSettingsTestCaseMixin, TempfileCheckTestCasekMixin, UserTestMixin,
|
||||
@@ -31,7 +30,6 @@ class BaseTestCase(
|
||||
"""
|
||||
This is the most basic test case class any test in the project should use.
|
||||
"""
|
||||
assert_download_response = assert_download_response
|
||||
|
||||
|
||||
class GenericViewTestCase(
|
||||
|
||||
Reference in New Issue
Block a user