Replace get_object_list() with self.object_list
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -10,17 +10,15 @@ from mayan.apps.smart_settings.classes import Namespace
|
||||
|
||||
from .mixins import (
|
||||
ClientMethodsTestCaseMixin, ContentTypeCheckTestCaseMixin,
|
||||
DatabaseConversionMixin, ModelTestCaseMixin,
|
||||
OpenFileCheckTestCaseMixin, RandomPrimaryKeyModelMonkeyPatchMixin,
|
||||
SilenceLoggerTestCaseMixin, TempfileCheckTestCasekMixin,
|
||||
TestViewTestCaseMixin
|
||||
ModelTestCaseMixin, OpenFileCheckTestCaseMixin,
|
||||
RandomPrimaryKeyModelMonkeyPatchMixin, SilenceLoggerTestCaseMixin,
|
||||
TempfileCheckTestCasekMixin, TestViewTestCaseMixin
|
||||
)
|
||||
|
||||
|
||||
class BaseTestCase(
|
||||
SilenceLoggerTestCaseMixin, RandomPrimaryKeyModelMonkeyPatchMixin,
|
||||
DatabaseConversionMixin, ACLTestCaseMixin,
|
||||
ModelTestCaseMixin, OpenFileCheckTestCaseMixin,
|
||||
ACLTestCaseMixin, ModelTestCaseMixin, OpenFileCheckTestCaseMixin,
|
||||
TempfileCheckTestCasekMixin, TestCase
|
||||
):
|
||||
"""
|
||||
|
||||
@@ -106,13 +106,6 @@ class ContentTypeCheckTestCaseMixin(object):
|
||||
self.client = CustomClient()
|
||||
|
||||
|
||||
class DatabaseConversionMixin(object):
|
||||
def _test_database_conversion(self, *app_labels):
|
||||
management.call_command(
|
||||
'convertdb', *app_labels, force=True
|
||||
)
|
||||
|
||||
|
||||
class ModelTestCaseMixin(object):
|
||||
def _model_instance_to_dictionary(self, instance):
|
||||
return instance._meta.model._default_manager.filter(
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.user_management.tests.mixins import UserTestMixin
|
||||
|
||||
|
||||
class UserLocaleProfileTestCase(UserTestMixin, BaseTestCase):
|
||||
def test_natural_keys(self):
|
||||
self._create_test_user()
|
||||
self._test_database_conversion('auth', 'common')
|
||||
Reference in New Issue
Block a user