mirror of
https://github.com/django/django.git
synced 2025-10-10 02:22:22 +00:00
Implemented persistent database connections.
Thanks Anssi Kääriäinen and Karen Tracey for their inputs.
This commit is contained in:
parent
d009ffe436
commit
2ee21d9f0d
16 changed files with 220 additions and 25 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue