mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
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.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user