diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-02-18 11:37:26 +0100 |
---|---|---|
committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-02-28 15:28:13 +0100 |
commit | 2ee21d9f0d9eaed0494f3b9cd4b5bc9beffffae5 (patch) | |
tree | 6c1e2924741812ecae3344382fe79b757a4469a1 /tests/wsgi | |
parent | d009ffe436410f6935798d910b0e489d53411dfa (diff) | |
download | django-2ee21d9f0d9eaed0494f3b9cd4b5bc9beffffae5.tar.gz |
Implemented persistent database connections.
Thanks Anssi Kääriäinen and Karen Tracey for their inputs.
Diffstat (limited to 'tests/wsgi')
-rw-r--r-- | tests/wsgi/tests.py | 8 |
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 |