diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2022-12-01 20:23:43 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-12-15 06:17:57 +0100 |
| commit | 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca (patch) | |
| tree | 15bb8bb049f9339f30d637e78b340473c2038126 /tests/backends/tests.py | |
| parent | d44ee518c4c110af25bebdbedbbf9fba04d197aa (diff) | |
Fixed #33308 -- Added support for psycopg version 3.
Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews.
Co-authored-by: Florian Apolloner <florian@apolloner.eu>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'tests/backends/tests.py')
| -rw-r--r-- | tests/backends/tests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py index c3cfa61fdb..5f11f91958 100644 --- a/tests/backends/tests.py +++ b/tests/backends/tests.py @@ -454,7 +454,7 @@ class BackendTestCase(TransactionTestCase): with connection.cursor() as cursor: self.assertIsInstance(cursor, CursorWrapper) # Both InterfaceError and ProgrammingError seem to be used when - # accessing closed cursor (psycopg2 has InterfaceError, rest seem + # accessing closed cursor (psycopg has InterfaceError, rest seem # to use ProgrammingError). with self.assertRaises(connection.features.closed_cursor_error_class): # cursor should be closed, so no queries should be possible. @@ -462,12 +462,12 @@ class BackendTestCase(TransactionTestCase): @unittest.skipUnless( connection.vendor == "postgresql", - "Psycopg2 specific cursor.closed attribute needed", + "Psycopg specific cursor.closed attribute needed", ) def test_cursor_contextmanager_closing(self): # There isn't a generic way to test that cursors are closed, but - # psycopg2 offers us a way to check that by closed attribute. - # So, run only on psycopg2 for that reason. + # psycopg offers us a way to check that by closed attribute. + # So, run only on psycopg for that reason. with connection.cursor() as cursor: self.assertIsInstance(cursor, CursorWrapper) self.assertTrue(cursor.closed) |
