mirror of
https://github.com/Hopiu/django-cachalot.git
synced 2026-04-19 20:50:58 +00:00
Removes some useless compatibility code.
This commit is contained in:
parent
7177361267
commit
e02632881e
3 changed files with 3 additions and 4 deletions
|
|
@ -22,7 +22,7 @@ from .models import PostgresModel, Test
|
|||
@skipIf(isinstance(caches['default'], FileBasedCache)
|
||||
and python_version_tuple()[:2] == ('2', '7'),
|
||||
'Caching psycopg2 objects is not working with file-based cache '
|
||||
'and Python 2.7.')
|
||||
'and Python 2.7 (see https://code.djangoproject.com/ticket/25501).')
|
||||
@override_settings(USE_TZ=True)
|
||||
class PostgresReadTest(TransactionTestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
from __future__ import unicode_literals
|
||||
from threading import Thread
|
||||
|
||||
from django import VERSION as django_version
|
||||
from django.db import connection, transaction
|
||||
from django.test import TransactionTestCase, skipUnlessDBFeature
|
||||
|
||||
|
|
@ -24,7 +23,7 @@ class TestThread(Thread):
|
|||
@skipUnlessDBFeature('test_db_allows_multiple_connections')
|
||||
class ThreadSafetyTestCase(TransactionTestCase):
|
||||
def setUp(self):
|
||||
if django_version >= (1, 7) and connection.vendor == 'mysql':
|
||||
if connection.vendor == 'mysql':
|
||||
# We need to reopen the connection or Django
|
||||
# will execute an extra SQL request below.
|
||||
connection.cursor()
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from .models import Test
|
|||
|
||||
class AtomicTestCase(TransactionTestCase):
|
||||
def setUp(self):
|
||||
if django_version >= (1, 7) and connection.vendor == 'mysql':
|
||||
if connection.vendor == 'mysql':
|
||||
# We need to reopen the connection or Django
|
||||
# will execute an extra SQL request below.
|
||||
connection.cursor()
|
||||
|
|
|
|||
Loading…
Reference in a new issue