diff options
Diffstat (limited to 'tests/backends/postgresql/tests.py')
| -rw-r--r-- | tests/backends/postgresql/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/backends/postgresql/tests.py b/tests/backends/postgresql/tests.py index 6fd0ba4420..96a1501693 100644 --- a/tests/backends/postgresql/tests.py +++ b/tests/backends/postgresql/tests.py @@ -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,)) |
