summaryrefslogtreecommitdiff
path: root/tests/model_fields
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-05-10 12:55:30 +0100
committerAndrew Godwin <andrew@aeracode.org>2013-05-10 12:55:30 +0100
commitcb4b0de49e027f09f8abe63e2fa43f60fc1ef13f (patch)
tree712da07b2b80fc503aea683c096a8774dceaad01 /tests/model_fields
parentf6801a234fb9460eac80d146534ac340e178c466 (diff)
parentbdd285723f9b0044eca690634c412c1c3eec76c0 (diff)
Merge branch 'master' into schema-alteration
Diffstat (limited to 'tests/model_fields')
-rw-r--r--tests/model_fields/tests.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py
index 9af8325040..035a5c2ae3 100644
--- a/tests/model_fields/tests.py
+++ b/tests/model_fields/tests.py
@@ -6,7 +6,7 @@ from decimal import Decimal
from django import test
from django import forms
from django.core.exceptions import ValidationError
-from django.db import models, IntegrityError
+from django.db import connection, models, IntegrityError
from django.db.models.fields.files import FieldFile
from django.utils import six
from django.utils import unittest
@@ -455,6 +455,10 @@ class BinaryFieldTests(test.TestCase):
# Test default value
self.assertEqual(bytes(dm.short_data), b'\x08')
+ if connection.vendor == 'mysql' and six.PY3:
+ # Existing MySQL DB-API drivers fail on binary data.
+ test_set_and_retrieve = unittest.expectedFailure(test_set_and_retrieve)
+
def test_max_length(self):
dm = DataModel(short_data=self.binary_data*4)
self.assertRaises(ValidationError, dm.full_clean)