summaryrefslogtreecommitdiff
path: root/tests/wsgi
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wsgi')
-rw-r--r--tests/wsgi/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/wsgi/tests.py b/tests/wsgi/tests.py
index 9b7ee68afd..a66258d4eb 100644
--- a/tests/wsgi/tests.py
+++ b/tests/wsgi/tests.py
@@ -2,7 +2,9 @@ from __future__ import unicode_literals
from django.core.exceptions import ImproperlyConfigured
from django.core.servers.basehttp import get_internal_wsgi_application
+from django.core.signals import request_started
from django.core.wsgi import get_wsgi_application
+from django.db import close_old_connections
from django.test import TestCase
from django.test.client import RequestFactory
from django.test.utils import override_settings
@@ -12,6 +14,12 @@ from django.utils import six, unittest
class WSGITest(TestCase):
urls = "wsgi.urls"
+ def setUp(self):
+ request_started.disconnect(close_old_connections)
+
+ def tearDown(self):
+ request_started.connect(close_old_connections)
+
def test_get_wsgi_application(self):
"""
Verify that ``get_wsgi_application`` returns a functioning WSGI