diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 2762350..bf622b9 100644
|
a
|
b
|
class BaseDatabaseFeatures(object):
|
| 414 | 414 | |
| 415 | 415 | def confirm(self): |
| 416 | 416 | "Perform manual checks of any database features that might vary between installs" |
| 417 | | self._confirmed = True |
| 418 | | self.supports_transactions = self._supports_transactions() |
| 419 | | self.supports_stddev = self._supports_stddev() |
| 420 | | self.can_introspect_foreign_keys = self._can_introspect_foreign_keys() |
| | 417 | if not self._confirmed: |
| | 418 | self._confirmed = True |
| | 419 | self.supports_transactions = self._supports_transactions() |
| | 420 | self.supports_stddev = self._supports_stddev() |
| | 421 | self.can_introspect_foreign_keys = self._can_introspect_foreign_keys() |
| 421 | 422 | |
| 422 | 423 | def _supports_transactions(self): |
| 423 | 424 | "Confirm support for transactions" |
| … |
… |
class BaseDatabaseFeatures(object):
|
| 439 | 440 | |
| 440 | 441 | try: |
| 441 | 442 | self.connection.ops.check_aggregate_support(StdDevPop()) |
| | 443 | return True |
| 442 | 444 | except NotImplementedError: |
| 443 | | self.supports_stddev = False |
| | 445 | return False |
| 444 | 446 | |
| 445 | 447 | def _can_introspect_foreign_keys(self): |
| 446 | 448 | "Confirm support for introspected foreign keys" |
diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py
index eec817c..10e69b6 100644
|
a
|
b
|
class BackendTestCase(TestCase):
|
| 397 | 397 | self.assertTrue(hasattr(connection.ops, 'connection')) |
| 398 | 398 | self.assertEqual(connection, connection.ops.connection) |
| 399 | 399 | |
| | 400 | def test_supports_needed_confirm(self): |
| | 401 | connection.features.confirm() |
| | 402 | self.assertIn(connection.features.supports_transactions, (True, False)) |
| | 403 | self.assertIn(connection.features.supports_stddev, (True, False)) |
| | 404 | self.assertIn(connection.features.can_introspect_foreign_keys, (True, False)) |
| | 405 | |
| 400 | 406 | def test_duplicate_table_error(self): |
| 401 | 407 | """ Test that creating an existing table returns a DatabaseError """ |
| 402 | 408 | cursor = connection.cursor() |