Fixed two test failures under Oracle
This commit is contained in:
parent
980eda0190
commit
056be4358d
|
@ -1,13 +1,16 @@
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
from django.core.checks import Error
|
from django.core.checks import Error
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
from django.db import models
|
from django.db import connection, models
|
||||||
|
|
||||||
from .base import IsolatedModelsTestCase
|
from .base import IsolatedModelsTestCase
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class AutoFieldTests(IsolatedModelsTestCase):
|
class AutoFieldTests(IsolatedModelsTestCase):
|
||||||
|
|
||||||
def test_valid_case(self):
|
def test_valid_case(self):
|
||||||
|
@ -176,6 +179,8 @@ class CharFieldTests(IsolatedModelsTestCase):
|
||||||
]
|
]
|
||||||
self.assertEqual(errors, expected)
|
self.assertEqual(errors, expected)
|
||||||
|
|
||||||
|
@unittest.skipUnless(connection.vendor == 'mysql',
|
||||||
|
"Test valid only for MySQL")
|
||||||
def test_too_long_char_field_under_mysql(self):
|
def test_too_long_char_field_under_mysql(self):
|
||||||
from django.db.backends.mysql.validation import DatabaseValidation
|
from django.db.backends.mysql.validation import DatabaseValidation
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,8 @@ class SchemaTests(TransactionTestCase):
|
||||||
# Ensure the field is right afterwards
|
# Ensure the field is right afterwards
|
||||||
columns = self.column_classes(Author)
|
columns = self.column_classes(Author)
|
||||||
self.assertEqual(columns['surname'][0], "CharField")
|
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):
|
def test_alter(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue