diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-09-24 10:32:26 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-09-24 10:37:22 +0200 |
| commit | 01104368ff77c788f95377e8aceb48772a42fb42 (patch) | |
| tree | fe8dc6480d38809e3b3ccf2b6e742d6566f3db95 /tests | |
| parent | b31e63879eb5d9717e9f890401f7222e4f00c910 (diff) | |
Refs #29444 -- Removed redundant DatabaseFeatures.can_return_multiple_columns_from_insert.
Unnecessary since b31e63879eb5d9717e9f890401f7222e4f00c910.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/queries/test_db_returning.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/tests/queries/test_db_returning.py b/tests/queries/test_db_returning.py index af9d041393..9ba352a7ab 100644 --- a/tests/queries/test_db_returning.py +++ b/tests/queries/test_db_returning.py @@ -1,7 +1,7 @@ import datetime -from django.db import NotSupportedError, connection -from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature +from django.db import connection +from django.test import TestCase, skipUnlessDBFeature from django.test.utils import CaptureQueriesContext from .models import DumbCategory, NonIntegerPKReturningModel, ReturningModel @@ -25,7 +25,6 @@ class ReturningValuesTests(TestCase): self.assertTrue(obj.created) self.assertIsInstance(obj.created, datetime.datetime) - @skipUnlessDBFeature('can_return_multiple_columns_from_insert') def test_insert_returning_multiple(self): with CaptureQueriesContext(connection) as captured_queries: obj = ReturningModel.objects.create() @@ -42,19 +41,7 @@ class ReturningValuesTests(TestCase): self.assertTrue(obj.pk) self.assertIsInstance(obj.created, datetime.datetime) - @skipIfDBFeature('can_return_multiple_columns_from_insert') - def test_insert_returning_multiple_not_supported(self): - msg = ( - 'Returning multiple columns from INSERT statements is ' - 'not supported on this database backend.' - ) - with self.assertRaisesMessage(NotSupportedError, msg): - ReturningModel.objects.create() - - @skipUnlessDBFeature( - 'can_return_rows_from_bulk_insert', - 'can_return_multiple_columns_from_insert', - ) + @skipUnlessDBFeature('can_return_rows_from_bulk_insert') def test_bulk_insert(self): objs = [ReturningModel(), ReturningModel(pk=2 ** 11), ReturningModel()] ReturningModel.objects.bulk_create(objs) |
