diff options
| author | Daniel Harding | 2014-04-25 08:38:06 -0500 | 
|---|---|---|
| committer | Daniel Harding | 2014-04-25 08:41:17 -0500 | 
| commit | 7ea9dc9d7df5420d73bae60121003112cc5944d7 (patch) | |
| tree | 4b507f8970ecc8681fd4e2e53a5140068c42ec92 /tests/panels | |
| parent | 6ce52b2532afaccca9932b7087533609fd239a9b (diff) | |
| download | django-debug-toolbar-7ea9dc9d7df5420d73bae60121003112cc5944d7.tar.bz2 | |
Improve the redirect context processor test.
* rename the context processor used from 'custom' to 'broken'
* remove the custom middleware, because it is not used in the context of
  the test
* rename the test to better identify what it is testing
Diffstat (limited to 'tests/panels')
| -rw-r--r-- | tests/panels/test_redirects.py | 10 | 
1 files changed, 3 insertions, 7 deletions
| diff --git a/tests/panels/test_redirects.py b/tests/panels/test_redirects.py index 71d53da..1fa773c 100644 --- a/tests/panels/test_redirects.py +++ b/tests/panels/test_redirects.py @@ -33,16 +33,12 @@ class RedirectsPanelTestCase(BaseTestCase):          self.assertContains(response, '302 FOUND')          self.assertContains(response, 'http://somewhere/else/') -    def test_redirect_breaks_procesor(self): -        middlewares = settings.MIDDLEWARE_CLASSES + [ -            'tests.middlewares.CustomMiddleware', -        ] +    def test_redirect_with_broken_context_processor(self):          context_processors = settings.TEMPLATE_CONTEXT_PROCESSORS + ( -            'tests.context_processors.custom', +            'tests.context_processors.broken',          ) -        with self.settings(MIDDLEWARE_CLASSES=middlewares, -                           TEMPLATE_CONTEXT_PROCESSORS=context_processors): +        with self.settings(TEMPLATE_CONTEXT_PROCESSORS=context_processors):              redirect = HttpResponse(status=302)              redirect['Location'] = 'http://somewhere/else/'              response = self.panel.process_response(self.request, redirect) | 
