Skip to content

Commit

Permalink
Skip tests on dbs without feature support
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Feb 1, 2020
1 parent afb26cf commit 1026337
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/schema/tests.py
Expand Up @@ -2648,6 +2648,7 @@ def test_add_field_use_effective_default(self):
item = cursor.fetchall()[0]
self.assertEqual(item[0], None if connection.features.interprets_empty_strings_as_nulls else '')

@skipUnlessDBFeature('can_return_columns_from_insert')
def test_add_field_default_db_returning(self):
# Create the table.
with connection.schema_editor() as editor:
Expand All @@ -2664,6 +2665,7 @@ def test_add_field_default_db_returning(self):
item = cursor.fetchall()[0]
self.assertIsNotNone(item[0])

@skipUnlessDBFeature('can_return_columns_from_insert')
def test_alter_field_default_db_returning(self):
# Create the table.
with connection.schema_editor() as editor:
Expand All @@ -2676,6 +2678,7 @@ def test_alter_field_default_db_returning(self):
with connection.schema_editor() as editor:
editor.alter_field(BookWithoutAuthor, old_field, new_field, strict=True)

@skipUnlessDBFeature('can_return_columns_from_insert')
def test_effective_default_db_default(self):
"""#31206 - effective_default() should be handle database defaults"""
new_field = DateTimeField(default=TruncDay(Now()))
Expand Down

0 comments on commit 1026337

Please sign in to comment.