Runs the bytes query test for SQLite on Python 2.

This commit is contained in:
Bertrand Bordage 2016-09-13 12:17:51 +02:00
parent 82262184c8
commit 13d71120d1
1 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ from django.core.cache import cache
from django.db import connection, transaction
from django.db.models import Count
from django.db.transaction import TransactionManagementError
from django.utils.six import PY3
from django.test import (
TransactionTestCase, skipUnlessDBFeature, override_settings)
from pytz import UTC
@ -654,8 +655,8 @@ class ReadTestCase(TransactionTestCase):
data2,
[('é',) + l for l in Test.objects.values_list(*attnames)])
@skipIf(connection.vendor == 'sqlite',
'SQLite doesnt accept bytes as raw query.')
@skipIf(PY3 and connection.vendor == 'sqlite',
'SQLite doesnt accept bytes as raw query in Python 3.')
def test_cursor_execute_bytes(self):
attname_column_list = [f.get_attname_column()
for f in Test._meta.fields]