diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 2762350..61f2df3 100644
a
|
b
|
class BaseDatabaseFeatures(object):
|
398 | 398 | # Does the backend support tablespaces? Default to False because it isn't |
399 | 399 | # in the SQL standard. |
400 | 400 | supports_tablespaces = False |
| 401 | |
| 402 | # Does the backend reset sequences between tests? |
| 403 | supports_sequence_reset = True |
401 | 404 | |
402 | 405 | # Features that need to be confirmed at runtime |
403 | 406 | # Cache whether the confirmation has been performed. |
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index 2f3a43d..fe512df 100644
a
|
b
|
class DatabaseFeatures(BaseDatabaseFeatures):
|
83 | 83 | ignores_nulls_in_unique_constraints = False |
84 | 84 | has_bulk_insert = True |
85 | 85 | supports_tablespaces = True |
| 86 | supports_sequence_reset = False |
86 | 87 | |
87 | 88 | class DatabaseOperations(BaseDatabaseOperations): |
88 | 89 | compiler_module = "django.db.backends.oracle.compiler" |
diff --git a/tests/regressiontests/test_runner/tests.py b/tests/regressiontests/test_runner/tests.py
index 3a8a4ef..0ecb3a1 100644
a
|
b
|
class AutoIncrementResetTest(TransactionTestCase):
|
291 | 291 | and check that both times they get "1" as their PK value. That is, we test |
292 | 292 | that AutoField values start from 1 for each transactional test case. |
293 | 293 | """ |
294 | | @unittest.skipIf(connection.vendor == 'oracle', |
295 | | "Oracle's auto-increment fields are not reset between " |
296 | | "tests") |
| 294 | @unittest.skipIf(not connection.features.supports_sequence_reset, |
| 295 | "Database backend's auto-increment fields are not reset " |
| 296 | "between tests") |
297 | 297 | def test_autoincrement_reset1(self): |
298 | 298 | p = Person.objects.create(first_name='Jack', last_name='Smith') |
299 | 299 | self.assertEqual(p.pk, 1) |
300 | 300 | |
301 | | @unittest.skipIf(connection.vendor == 'oracle', |
302 | | "Oracle's auto-increment fields are not reset between " |
303 | | "tests") |
| 301 | @unittest.skipIf(not connection.features.supports_sequence_reset, |
| 302 | "Database backend's auto-increment fields are not reset " |
| 303 | "between tests") |
304 | 304 | def test_autoincrement_reset2(self): |
305 | 305 | p = Person.objects.create(first_name='Jack', last_name='Smith') |
306 | 306 | self.assertEqual(p.pk, 1) |