diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-05-07 21:50:09 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-05-08 22:53:00 +0200 |
| commit | e3bc11cca9425367efb4ce1eb923785895a83c1b (patch) | |
| tree | 62cbc0d3a27304b0bd73b53f1936f74f248668e1 /tests/model_fields | |
| parent | 7f48d44c606e59f239f825cc221f6d92bd2ce9af (diff) | |
[1.7.x] Replaced vendor checks by three feature flags.
Backport of c70a61eb from master
Diffstat (limited to 'tests/model_fields')
| -rw-r--r-- | tests/model_fields/tests.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py index 48d3e6a41b..b718986fd2 100644 --- a/tests/model_fields/tests.py +++ b/tests/model_fields/tests.py @@ -605,6 +605,7 @@ class FileFieldTests(unittest.TestCase): class BinaryFieldTests(test.TestCase): binary_data = b'\x00\x46\xFE' + @test.skipUnlessDBFeature('supports_binary_field') def test_set_and_retrieve(self): data_set = (self.binary_data, six.memoryview(self.binary_data)) for bdata in data_set: @@ -619,10 +620,6 @@ 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) |
