Add (failing) tests cases for makeing a column not null with a Django default value
This commit is contained in:
1 parent
d411ea2f6b
commit
f21ff2c278
16 files changed
+174
No files matched your search
@@ -44,6 +44,14 @@ class BaseBackwardCompatibilityDetection(object):
|
||||
app = fixtures.ADD_NOT_NULL_COLUMN
|
||||
self._test_linter_finds_errors(app)
|
||||
|
||||
def test_detect_make_column_not_null_with_django_default(self):
|
||||
app = fixtures.MAKE_NOT_NULL_WITH_DJANGO_DEFAULT
|
||||
self._test_linter_finds_errors(app)
|
||||
|
||||
def test_detect_make_column_not_null_with_lib_default(self):
|
||||
app = fixtures.MAKE_NOT_NULL_WITH_LIB_DEFAULT
|
||||
self._test_linter_finds_no_errors(app)
|
||||
|
||||
def test_detect_drop_column(self):
|
||||
app = fixtures.DROP_COLUMN
|
||||
self._test_linter_finds_errors(app)
|
||||
@@ -97,6 +105,15 @@ class SqliteBackwardCompatibilityDetectionTestCase(
|
||||
app = fixtures.ADD_NOT_NULL_COLUMN_FOLLOWED_BY_DEFAULT
|
||||
self._test_linter_finds_errors(app)
|
||||
|
||||
def test_detect_make_column_not_null_with_django_default(self):
|
||||
app = fixtures.MAKE_NOT_NULL_WITH_DJANGO_DEFAULT
|
||||
self._test_linter_finds_errors(app)
|
||||
|
||||
def test_detect_make_column_not_null_with_lib_default(self):
|
||||
# The 'django-add-default-value' doesn't handle sqlite correctly
|
||||
app = fixtures.MAKE_NOT_NULL_WITH_LIB_DEFAULT
|
||||
self._test_linter_finds_errors(app)
|
||||
|
||||
|
||||
class MySqlBackwardCompatibilityDetectionTestCase(
|
||||
BaseBackwardCompatibilityDetection, unittest.TestCase
|
||||
|
||||
Reference in new issue
Block a user