From f48f671223a20b161ca819cf7d6298e43b8ba5fe Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 3 Feb 2020 19:07:00 -0800 Subject: 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. --- tests/postgres_tests/test_signals.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/postgres_tests') diff --git a/tests/postgres_tests/test_signals.py b/tests/postgres_tests/test_signals.py index 3c6502b5e7..f1569c361c 100644 --- a/tests/postgres_tests/test_signals.py +++ b/tests/postgres_tests/test_signals.py @@ -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) -- cgit v1.3