Marked tests of BinaryFields as expected failures on MySQL and Python 3.

Current ports of MySQLdb are very buggy in this area.
This commit is contained in:
Aymeric Augustin 2013-05-08 15:33:02 +02:00
parent 86b4ac665a
commit 7476d96f83
3 changed files with 14 additions and 2 deletions

View file

@ -26,7 +26,7 @@ from django.test import TestCase
from django.utils import six
from django.utils.encoding import force_text
from django.utils.functional import curry
from django.utils.unittest import skipUnless
from django.utils.unittest import expectedFailure, skipUnless
from .models import (BinaryData, BooleanData, CharData, DateData, DateTimeData, EmailData,
FileData, FilePathData, DecimalData, FloatData, IntegerData, IPAddressData,
@ -459,6 +459,11 @@ def serializerTest(format, self):
for klass, count in instance_count.items():
self.assertEqual(count, klass.objects.count())
if connection.vendor == 'mysql' and six.PY3:
# Existing MySQL DB-API drivers fail on binary data.
serializerTest = expectedFailure(serializerTest)
def naturalKeySerializerTest(format, self):
# Create all the objects defined in the test data
objects = []