summaryrefslogtreecommitdiff
path: root/tests/httpwrappers
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-02-18 11:37:26 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-02-28 15:28:13 +0100
commit2ee21d9f0d9eaed0494f3b9cd4b5bc9beffffae5 (patch)
tree6c1e2924741812ecae3344382fe79b757a4469a1 /tests/httpwrappers
parentd009ffe436410f6935798d910b0e489d53411dfa (diff)
Implemented persistent database connections.
Thanks Anssi Kääriäinen and Karen Tracey for their inputs.
Diffstat (limited to 'tests/httpwrappers')
-rw-r--r--tests/httpwrappers/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py
index 2964a86034..194232e92f 100644
--- a/tests/httpwrappers/tests.py
+++ b/tests/httpwrappers/tests.py
@@ -8,7 +8,7 @@ import warnings
from django.core.exceptions import SuspiciousOperation
from django.core.signals import request_finished
-from django.db import close_connection
+from django.db import close_old_connections
from django.http import (QueryDict, HttpResponse, HttpResponseRedirect,
HttpResponsePermanentRedirect, HttpResponseNotAllowed,
HttpResponseNotModified, StreamingHttpResponse,
@@ -490,10 +490,10 @@ class FileCloseTests(TestCase):
def setUp(self):
# Disable the request_finished signal during this test
# to avoid interfering with the database connection.
- request_finished.disconnect(close_connection)
+ request_finished.disconnect(close_old_connections)
def tearDown(self):
- request_finished.connect(close_connection)
+ request_finished.connect(close_old_connections)
def test_response(self):
filename = os.path.join(os.path.dirname(upath(__file__)), 'abc.txt')