diff options
| author | Shai Berger <shai@platonix.com> | 2014-01-20 13:01:14 +0200 |
|---|---|---|
| committer | Shai Berger <shai@platonix.com> | 2014-01-20 13:01:14 +0200 |
| commit | 056be4358de0e747f789e4a711ea5dd51749ab11 (patch) | |
| tree | ae9b774798506b4ba3f45116ce8e68ce98febab7 | |
| parent | 980eda01909c9fd5c5e16f276ca663e71371a0a2 (diff) | |
Fixed two test failures under Oracle
| -rw-r--r-- | tests/invalid_models_tests/test_ordinary_fields.py | 7 | ||||
| -rw-r--r-- | tests/schema/tests.py | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/invalid_models_tests/test_ordinary_fields.py b/tests/invalid_models_tests/test_ordinary_fields.py index d14b907cdb..2c0a4d4672 100644 --- a/tests/invalid_models_tests/test_ordinary_fields.py +++ b/tests/invalid_models_tests/test_ordinary_fields.py @@ -1,13 +1,16 @@ # -*- encoding: utf-8 -*- from __future__ import unicode_literals +import unittest + from django.core.checks import Error from django.core.exceptions import ImproperlyConfigured -from django.db import models +from django.db import connection, models from .base import IsolatedModelsTestCase + class AutoFieldTests(IsolatedModelsTestCase): def test_valid_case(self): @@ -176,6 +179,8 @@ class CharFieldTests(IsolatedModelsTestCase): ] self.assertEqual(errors, expected) + @unittest.skipUnless(connection.vendor == 'mysql', + "Test valid only for MySQL") def test_too_long_char_field_under_mysql(self): from django.db.backends.mysql.validation import DatabaseValidation diff --git a/tests/schema/tests.py b/tests/schema/tests.py index 6e92d5b784..88388ac0b4 100644 --- a/tests/schema/tests.py +++ b/tests/schema/tests.py @@ -182,7 +182,8 @@ class SchemaTests(TransactionTestCase): # Ensure the field is right afterwards columns = self.column_classes(Author) self.assertEqual(columns['surname'][0], "CharField") - self.assertEqual(columns['surname'][1][6], False) + self.assertEqual(columns['surname'][1][6], + connection.features.interprets_empty_strings_as_nulls) def test_alter(self): """ |
