mirror of
https://github.com/django/django.git
synced 2025-07-19 03:05:32 +00:00
Refs #31233 -- Changed DatabaseWrapper._nodb_connection to _nodb_cursor().
It is now a method instead of a property and returns a context manager that yields a cursor on entry and closes the cursor and connection upon exit.
This commit is contained in:
parent
2d55cb5c4a
commit
f48f671223
8 changed files with 58 additions and 34 deletions
|
@ -38,4 +38,5 @@ class OIDTests(PostgreSQLTestCase):
|
|||
|
||||
def test_register_type_handlers_no_db(self):
|
||||
"""Registering type handlers for the nodb connection does nothing."""
|
||||
register_type_handlers(connection._nodb_connection)
|
||||
with connection._nodb_cursor() as cursor:
|
||||
register_type_handlers(cursor.db)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue