mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
This addressed a regression introduced bya96b901932as identified by Ran Benita. Backport of7071f8f272from master
This commit is contained in:
committed by
Carlton Gibson
parent
9278acfd12
commit
7f25344c2e
@@ -134,6 +134,12 @@ class Tests(TestCase):
|
||||
finally:
|
||||
new_connection.close()
|
||||
|
||||
def test_connect_no_is_usable_checks(self):
|
||||
new_connection = connection.copy()
|
||||
with mock.patch.object(new_connection, 'is_usable') as is_usable:
|
||||
new_connection.connect()
|
||||
is_usable.assert_not_called()
|
||||
|
||||
def _select(self, val):
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute('SELECT %s', (val,))
|
||||
|
||||
Reference in New Issue
Block a user