summaryrefslogtreecommitdiff
path: root/tests/shortcuts
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-11-13 20:25:08 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-11-23 09:29:33 +0100
commit17012b6936128fb771b98e4fa6d78caddd07a9a8 (patch)
treeb662345113691bc30944eec4f12a39400cec908b /tests/shortcuts
parentbcb693ebd4d3743cb194c6fd05b2d70fb9696a4c (diff)
downloaddjango-17012b6936128fb771b98e4fa6d78caddd07a9a8.tar.gz
Deprecated dirs argument to override TEMPLATE_DIRS.
Cancels 2f0566fa. Refs #4278.
Diffstat (limited to 'tests/shortcuts')
-rw-r--r--tests/shortcuts/tests.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/shortcuts/tests.py b/tests/shortcuts/tests.py
index 24a73d4ffd..2b55326311 100644
--- a/tests/shortcuts/tests.py
+++ b/tests/shortcuts/tests.py
@@ -1,3 +1,5 @@
+import warnings
+from django.utils.deprecation import RemovedInDjango20Warning
from django.test import TestCase, override_settings
@@ -27,7 +29,9 @@ class ShortcutTests(TestCase):
self.assertEqual(response['Content-Type'], 'application/x-rendertest')
def test_render_to_response_with_dirs(self):
- response = self.client.get('/render_to_response/dirs/')
+ with warnings.catch_warnings():
+ warnings.filterwarnings("ignore", category=RemovedInDjango20Warning)
+ response = self.client.get('/render_to_response/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')
@@ -70,7 +74,9 @@ class ShortcutTests(TestCase):
self.assertEqual(response.context.current_app, "foobar_app")
def test_render_with_dirs(self):
- response = self.client.get('/render/dirs/')
+ with warnings.catch_warnings():
+ warnings.filterwarnings("ignore", category=RemovedInDjango20Warning)
+ 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')