3434from .fixtures import transactional_db # noqa
3535from .pytest_compat import getfixturevalue
3636
37- from .lazy_django import (django_settings_is_configured ,
38- get_django_version , skip_if_no_django )
37+ from .lazy_django import django_settings_is_configured , skip_if_no_django
3938
4039
4140SETTINGS_MODULE_ENV = 'DJANGO_SETTINGS_MODULE'
@@ -63,10 +62,10 @@ def pytest_addoption(parser):
6362 help = 'Set DJANGO_CONFIGURATION.' )
6463 group ._addoption ('--nomigrations' , '--no-migrations' ,
6564 action = 'store_true' , dest = 'nomigrations' , default = False ,
66- help = 'Disable Django 1.7+ migrations on test setup' )
65+ help = 'Disable Django migrations on test setup' )
6766 group ._addoption ('--migrations' ,
6867 action = 'store_false' , dest = 'nomigrations' , default = False ,
69- help = 'Enable Django 1.7+ migrations on test setup' )
68+ help = 'Enable Django migrations on test setup' )
7069 parser .addini (CONFIGURATION_ENV ,
7170 'django-configurations class to use by pytest-django.' )
7271 group ._addoption ('--liveserver' , default = None ,
@@ -540,7 +539,7 @@ def __mod__(self, var):
540539 django_settings_is_configured ()):
541540 from django .conf import settings as dj_settings
542541
543- if get_django_version () >= ( 1 , 8 ) and dj_settings .TEMPLATES :
542+ if dj_settings .TEMPLATES :
544543 dj_settings .TEMPLATES [0 ]['OPTIONS' ]['string_if_invalid' ] = (
545544 InvalidVarException ())
546545 else :
@@ -556,7 +555,7 @@ def _template_string_if_invalid_marker(request):
556555 if marker and django_settings_is_configured ():
557556 from django .conf import settings as dj_settings
558557
559- if get_django_version () >= ( 1 , 8 ) and dj_settings .TEMPLATES :
558+ if dj_settings .TEMPLATES :
560559 dj_settings .TEMPLATES [0 ]['OPTIONS' ]['string_if_invalid' ].fail = False
561560 else :
562561 dj_settings .TEMPLATE_STRING_IF_INVALID .fail = False
@@ -601,7 +600,7 @@ def __init__(self):
601600
602601 @property
603602 def _dj_db_wrapper (self ):
604- from . compat import BaseDatabaseWrapper
603+ from django . db . backends . base . base import BaseDatabaseWrapper
605604
606605 # The first time the _dj_db_wrapper is accessed, we will save a
607606 # reference to the real implementation.
0 commit comments