Removes some useless compatibility code.

This commit is contained in:
Bertrand Bordage 2015-10-28 12:13:48 +01:00
parent 7177361267
commit e02632881e
3 changed files with 3 additions and 4 deletions

View file

@ -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):

View file

@ -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()

View file

@ -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()