From 3ffeb931869cc68a8e0916219702ee282afc6e9d Mon Sep 17 00:00:00 2001 From: Michael Manfre Date: Thu, 9 Jan 2014 10:05:15 -0500 Subject: Ensure cursors are closed when no longer needed. This commit touchs various parts of the code base and test framework. Any found usage of opening a cursor for the sake of initializing a connection has been replaced with 'ensure_connection()'. --- tests/requests/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/requests') diff --git a/tests/requests/tests.py b/tests/requests/tests.py index bb56369371..3e594376aa 100644 --- a/tests/requests/tests.py +++ b/tests/requests/tests.py @@ -725,7 +725,7 @@ class DatabaseConnectionHandlingTests(TransactionTestCase): # request_finished signal. response = self.client.get('/') # Make sure there is an open connection - connection.cursor() + self.connection.ensure_connection() connection.enter_transaction_management() signals.request_finished.send(sender=response._handler_class) self.assertEqual(len(connection.transaction_state), 0) -- cgit v1.3