diff options
| author | Aymeric Augustin | 2014-04-19 09:55:17 +0200 |
|---|---|---|
| committer | Aymeric Augustin | 2014-04-19 09:55:17 +0200 |
| commit | 4e7e465a49746f8717bf6340ef7cdcea5a31ab06 (patch) | |
| tree | 4e786bdea28d2ba0376c01a0ccb332926a2813c4 /tests | |
| parent | 0fabf937f20c162180c383eec7a9a327e2b5ab8c (diff) | |
| download | django-debug-toolbar-4e7e465a49746f8717bf6340ef7cdcea5a31ab06.tar.bz2 | |
Flake8.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/context_processors.py | 5 | ||||
| -rw-r--r-- | tests/panels/test_redirects.py | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/context_processors.py b/tests/context_processors.py index 3514639..4c08000 100644 --- a/tests/context_processors.py +++ b/tests/context_processors.py @@ -1,3 +1,2 @@ - -def custom(req): - msg = req.myattr +def custom(request): + request.non_existing_attribute diff --git a/tests/panels/test_redirects.py b/tests/panels/test_redirects.py index 8e63ff0..71d53da 100644 --- a/tests/panels/test_redirects.py +++ b/tests/panels/test_redirects.py @@ -34,9 +34,12 @@ class RedirectsPanelTestCase(BaseTestCase): self.assertContains(response, 'http://somewhere/else/') def test_redirect_breaks_procesor(self): - middlewares = settings.MIDDLEWARE_CLASSES + ['tests.middlewares.CustomMiddleware'] - context_processors = settings.TEMPLATE_CONTEXT_PROCESSORS + \ - ('tests.context_processors.custom',) + middlewares = settings.MIDDLEWARE_CLASSES + [ + 'tests.middlewares.CustomMiddleware', + ] + context_processors = settings.TEMPLATE_CONTEXT_PROCESSORS + ( + 'tests.context_processors.custom', + ) with self.settings(MIDDLEWARE_CLASSES=middlewares, TEMPLATE_CONTEXT_PROCESSORS=context_processors): |
