mirror of
https://github.com/django/django.git
synced 2025-12-09 19:08:06 +00:00
Removed current_app argument to render() and TemplateResponse().
Per deprecation timeline.
This commit is contained in:
parent
75374d3797
commit
5e450c52aa
15 changed files with 19 additions and 175 deletions
|
|
@ -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/')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue