Kaydet (Commit) ce770aae authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

The tests added in r9184 were altering the test environment in bad ways. Fixed

this with proper setUp() and tearDown() methods.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 70b6c4c0
......@@ -6,6 +6,14 @@ from django.middleware.common import CommonMiddleware
from django.conf import settings
class CommonMiddlewareTest(TestCase):
def setUp(self):
self.slash = settings.APPEND_SLASH
self.www = settings.PREPEND_WWW
def tearDown(self):
settings.APPEND_SLASH = self.slash
settings.PREPEND_WWW = self.www
def _get_request(self, path):
request = HttpRequest()
request.META = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment