From 4e7e465a49746f8717bf6340ef7cdcea5a31ab06 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 19 Apr 2014 09:55:17 +0200 Subject: Flake8. --- tests/context_processors.py | 5 ++--- 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): -- cgit v1.2.3