summaryrefslogtreecommitdiff
path: root/tests/shortcuts
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-12-14 17:48:51 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-12-28 17:02:29 +0100
commitcf1f36bb6eb34fafe6c224003ad585a647f6117b (patch)
tree7e3714ca48a6456ba5d3ebed2fc873f9ff0e6dc6 /tests/shortcuts
parente53495ba3352c2c0fdb6178f2b333c30cb6b5d46 (diff)
Deprecated current_app in TemplateResponse and render(_to_response).
Diffstat (limited to 'tests/shortcuts')
-rw-r--r--tests/shortcuts/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/shortcuts/tests.py b/tests/shortcuts/tests.py
index 429738b22f..984373bfe7 100644
--- a/tests/shortcuts/tests.py
+++ b/tests/shortcuts/tests.py
@@ -54,7 +54,7 @@ class ShortcutTests(TestCase):
self.assertEqual(response.status_code, 200)
self.assertEqual(response.content, b'FOO.BAR../path/to/static/media/\n')
self.assertEqual(response['Content-Type'], 'text/html; charset=utf-8')
- self.assertEqual(response.context.current_app, None)
+ self.assertFalse(hasattr(response.context.request, 'current_app'))
def test_render_with_base_context(self):
with warnings.catch_warnings():
@@ -79,7 +79,7 @@ class ShortcutTests(TestCase):
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=RemovedInDjango20Warning)
response = self.client.get('/render/current_app/')
- self.assertEqual(response.context.current_app, "foobar_app")
+ self.assertEqual(response.context.request.current_app, "foobar_app")
def test_render_with_dirs(self):
with warnings.catch_warnings():