aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_description.py
diff options
context:
space:
mode:
authorTymur Maryokhin2014-12-04 02:50:25 +0100
committerTymur Maryokhin2014-12-04 02:50:25 +0100
commit09e59f268619927dc22f15fed97c3ceac05ea306 (patch)
treec49f1adee6a631ea9abacc1425d5d92bdbec2da8 /tests/test_description.py
parentf8fdfe5a9379bd72066f7ac3a05198271a74088a (diff)
downloaddjango-rest-framework-09e59f268619927dc22f15fed97c3ceac05ea306.tar.bz2
Removed custom python_2_unicode_compatible. Closes #2183
Diffstat (limited to 'tests/test_description.py')
-rw-r--r--tests/test_description.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_description.py b/tests/test_description.py
index 0675d209..6cd871ed 100644
--- a/tests/test_description.py
+++ b/tests/test_description.py
@@ -2,6 +2,7 @@
from __future__ import unicode_literals
from django.test import TestCase
+from django.utils.encoding import python_2_unicode_compatible
from rest_framework.compat import apply_markdown, smart_text
from rest_framework.views import APIView
from .description import ViewWithNonASCIICharactersInDocstring
@@ -107,6 +108,7 @@ class TestViewNamesAndDescriptions(TestCase):
"""
# use a mock object instead of gettext_lazy to ensure that we can't end
# up with a test case string in our l10n catalog
+ @python_2_unicode_compatible
class MockLazyStr(object):
def __init__(self, string):
self.s = string
@@ -114,9 +116,6 @@ class TestViewNamesAndDescriptions(TestCase):
def __str__(self):
return self.s
- def __unicode__(self):
- return self.s
-
class MockView(APIView):
__doc__ = MockLazyStr("a gettext string")