Permalink
Browse files

The tests added in r9184 were altering the test environment in bad wa…

…ys. Fixed

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


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 70b6c4c commit ce770aaecd1f3677c501ab41e5adbed8db44f109 @malcolmt malcolmt committed Oct 8, 2008
Showing with 8 additions and 0 deletions.
  1. +8 −0 tests/regressiontests/middleware/tests.py
@@ -6,6 +6,14 @@
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 = {

0 comments on commit ce770aa

Please sign in to comment.