The connection wrapper shouldn't believe that autocommit is enabled after setting the time zone when AUTOCOMMIT is False (#21452).
(self)
| 219 | new_connection.close() |
| 220 | |
| 221 | def test_connect_non_autocommit(self): |
| 222 | """ |
| 223 | The connection wrapper shouldn't believe that autocommit is enabled |
| 224 | after setting the time zone when AUTOCOMMIT is False (#21452). |
| 225 | """ |
| 226 | new_connection = no_pool_connection() |
| 227 | new_connection.settings_dict["AUTOCOMMIT"] = False |
| 228 | |
| 229 | try: |
| 230 | # Open a database connection. |
| 231 | with new_connection.cursor(): |
| 232 | self.assertFalse(new_connection.get_autocommit()) |
| 233 | finally: |
| 234 | new_connection.close() |
| 235 | |
| 236 | @unittest.skipUnless(is_psycopg3, "psycopg3 specific test") |
| 237 | def test_connect_pool(self): |
nothing calls this directly
no test coverage detected