Update all tests (and runtests.py)
parent
b996d1c377
commit
adcad20b48
|
|
@ -234,7 +234,7 @@ def _create_model_filter_Q(modellist, not_instance_of=False):
|
|||
if not modellist:
|
||||
return None
|
||||
|
||||
from .polymorphic_model import PolymorphicModel
|
||||
from .models import PolymorphicModel
|
||||
|
||||
if type(modellist) != list and type(modellist) != tuple:
|
||||
if issubclass(modellist, PolymorphicModel):
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ from __future__ import print_function
|
|||
import uuid
|
||||
import re
|
||||
import django
|
||||
try:
|
||||
from unittest import skipIf
|
||||
except:
|
||||
# python<2.7
|
||||
from django.utils.unittest import skipIf
|
||||
from django.db.models.query import QuerySet
|
||||
|
||||
|
|
@ -15,7 +19,9 @@ from django.db import models
|
|||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.utils import six
|
||||
|
||||
from polymorphic import PolymorphicModel, PolymorphicManager, PolymorphicQuerySet
|
||||
from polymorphic.models import PolymorphicModel
|
||||
from polymorphic.manager import PolymorphicManager
|
||||
from polymorphic.query import PolymorphicQuerySet
|
||||
from polymorphic import ShowFieldContent, ShowFieldType, ShowFieldTypeAndContent
|
||||
from polymorphic.tools_for_tests import UUIDField
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,10 @@ if not settings.configured:
|
|||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
),
|
||||
TEMPLATE_CONTEXT_PROCESSORS = default_settings.TEMPLATE_CONTEXT_PROCESSORS + (
|
||||
TEMPLATE_CONTEXT_PROCESSORS=(
|
||||
default_settings.TEMPLATE_CONTEXT_PROCESSORS + [
|
||||
'django.core.context_processors.request',
|
||||
]
|
||||
),
|
||||
TEST_RUNNER = 'django.test.runner.DiscoverRunner' if django.VERSION >= (1,7) else 'django.test.simple.DjangoTestSuiteRunner',
|
||||
INSTALLED_APPS = (
|
||||
|
|
|
|||
Loading…
Reference in New Issue