summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-06-09 15:59:52 +0200
committerClaude Paroz <claude@2xlibre.net>2012-06-09 15:59:52 +0200
commitaa423575e7b464433fcfc4bf4b8e1d7627b17ce6 (patch)
treead0b7d2ebefd427986e4ce816fe6e8d64ccecd12 /tests
parent484fcd34a4819ff11ef72f3c9e1eb467a282b2f6 (diff)
Fixed #17760 -- Implemented callable database features as cached properties
This does remove the requirement to call features.confirm() method before checking the properties. Thanks cdestiger and Ramiro Morales for their work on the patch.
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/backends/tests.py3
-rw-r--r--tests/regressiontests/transactions_regress/tests.py2
2 files changed, 2 insertions, 3 deletions
diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py
index 2569a3236f..53551fa54d 100644
--- a/tests/regressiontests/backends/tests.py
+++ b/tests/regressiontests/backends/tests.py
@@ -403,8 +403,7 @@ class BackendTestCase(TestCase):
self.assertTrue(hasattr(connection.ops, 'connection'))
self.assertEqual(connection, connection.ops.connection)
- def test_supports_needed_confirm(self):
- connection.features.confirm()
+ def test_cached_db_features(self):
self.assertIn(connection.features.supports_transactions, (True, False))
self.assertIn(connection.features.supports_stddev, (True, False))
self.assertIn(connection.features.can_introspect_foreign_keys, (True, False))
diff --git a/tests/regressiontests/transactions_regress/tests.py b/tests/regressiontests/transactions_regress/tests.py
index 59722630df..abd7a4ceaa 100644
--- a/tests/regressiontests/transactions_regress/tests.py
+++ b/tests/regressiontests/transactions_regress/tests.py
@@ -208,7 +208,7 @@ class SavepointTest(TransactionTestCase):
work()
@skipIf(connection.vendor == 'mysql' and \
- connection.features._mysql_storage_engine() == 'MyISAM',
+ connection.features._mysql_storage_engine == 'MyISAM',
"MyISAM MySQL storage engine doesn't support savepoints")
@skipUnlessDBFeature('uses_savepoints')
def test_savepoint_rollback(self):