1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Removed current_app argument to render() and TemplateResponse().

Per deprecation timeline.
This commit is contained in:
Tim Graham
2015-09-03 15:52:04 -04:00
parent 75374d3797
commit 5e450c52aa
15 changed files with 19 additions and 175 deletions

View File

@@ -102,19 +102,9 @@ class ShortcutTests(SimpleTestCase):
response = self.client.get('/render/using/?using=jinja2')
self.assertEqual(response.content, b'Jinja2\n')
@ignore_warnings(category=RemovedInDjango110Warning)
def test_render_with_current_app(self):
response = self.client.get('/render/current_app/')
self.assertEqual(response.context.request.current_app, "foobar_app")
@ignore_warnings(category=RemovedInDjango110Warning)
def test_render_with_dirs(self):
response = self.client.get('/render/dirs/')
self.assertEqual(response.status_code, 200)
self.assertEqual(response.content, b'spam eggs\n')
self.assertEqual(response['Content-Type'], 'text/html; charset=utf-8')
@ignore_warnings(category=RemovedInDjango110Warning)
def test_render_with_current_app_conflict(self):
with self.assertRaises(ValueError):
self.client.get('/render/current_app_conflict/')