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:11:15 +0200 |
| commit | c70a61eb49e4ed8f3b2a5011a7a5e6cda43c8598 (patch) | |
| tree | e59c24f409be666c224f986ce21c423d4ee0b2fe /tests/model_fields | |
| parent | 43a80f4812a762c2ea96b3de45662ace04404287 (diff) | |
Replaced vendor checks by three feature flags.
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 c1c240cafb..b33314bfd3 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) |
