diff options
author | Tim Graham <timograham@gmail.com> | 2016-12-31 09:52:31 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2017-01-17 20:52:02 -0500 |
commit | 9d304b26cf2ce071a682bf68a29dee04d0e4cfdb (patch) | |
tree | ad8dc77522035dc2be7edc11622b33e58ecb23ed /tests/decorators | |
parent | 7e63e84572f076c3cb2988d753a334e204116ddb (diff) | |
download | django-9d304b26cf2ce071a682bf68a29dee04d0e4cfdb.tar.gz |
Refs #20223 -- Removed deprecated django.utils.functional.allow_lazy().
Diffstat (limited to 'tests/decorators')
-rw-r--r-- | tests/decorators/tests.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/tests/decorators/tests.py b/tests/decorators/tests.py index f8f8f4dc0a..851c2b8daa 100644 --- a/tests/decorators/tests.py +++ b/tests/decorators/tests.py @@ -8,13 +8,9 @@ from django.contrib.auth.decorators import ( from django.http import HttpRequest, HttpResponse, HttpResponseNotAllowed from django.middleware.clickjacking import XFrameOptionsMiddleware from django.test import SimpleTestCase -from django.utils import six from django.utils.decorators import method_decorator -from django.utils.deprecation import RemovedInDjango20Warning -from django.utils.encoding import force_text -from django.utils.functional import allow_lazy, keep_lazy, keep_lazy_text, lazy +from django.utils.functional import keep_lazy, keep_lazy_text, lazy from django.utils.safestring import mark_safe -from django.utils.translation import ugettext_lazy from django.views.decorators.cache import ( cache_control, cache_page, never_cache, ) @@ -155,15 +151,6 @@ class DecoratorsTest(TestCase): request.method = 'DELETE' self.assertIsInstance(my_safe_view(request), HttpResponseNotAllowed) - def test_deprecated_allow_lazy(self): - with self.assertRaises(RemovedInDjango20Warning): - def noop_text(text): - return force_text(text) - noop_text = allow_lazy(noop_text, six.text_type) - rendered = noop_text(ugettext_lazy("I am a text")) - self.assertEqual(type(rendered), six.text_type) - self.assertEqual(rendered, "I am a text") - # For testing method_decorator, a decorator that assumes a single argument. # We will get type arguments if there is a mismatch in the number of arguments. |