summaryrefslogtreecommitdiff
path: root/tests/requests
diff options
context:
space:
mode:
authorMichael Manfre <mmanfre@gmail.com>2014-01-09 10:05:15 -0500
committerMichael Manfre <mmanfre@gmail.com>2014-02-02 12:47:21 -0500
commit3ffeb931869cc68a8e0916219702ee282afc6e9d (patch)
treef24020307dd5b529989329bfabfc95effcecffe8 /tests/requests
parent0837eacc4e1fa7916e48135e8ba43f54a7a64997 (diff)
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()'.
Diffstat (limited to 'tests/requests')
-rw-r--r--tests/requests/tests.py2
1 files changed, 1 insertions, 1 deletions
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)