diff options
| author | Paul Oswald | 2014-08-07 15:48:29 +0900 |
|---|---|---|
| committer | Paul Oswald | 2014-08-07 15:48:29 +0900 |
| commit | 192201d5840f13c8b96f44fdce4645edeb653f0f (patch) | |
| tree | a4f945b709aba1cc0f65e862de35be0dba989a37 | |
| parent | 66fa40c300b4d3e768b4a7993f020056c44fdda3 (diff) | |
| download | django-rest-framework-192201d5840f13c8b96f44fdce4645edeb653f0f.tar.bz2 | |
remove dep on python_2_unicode_compatible
python_2_unicode_compatible is not available in all Django versions
| -rw-r--r-- | rest_framework/tests/test_description.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rest_framework/tests/test_description.py b/rest_framework/tests/test_description.py index 52fa55fb..8aa16261 100644 --- a/rest_framework/tests/test_description.py +++ b/rest_framework/tests/test_description.py @@ -2,7 +2,6 @@ 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 rest_framework.tests.description import ViewWithNonASCIICharactersInDocstring @@ -108,17 +107,18 @@ 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 def __str__(self): return self.s + def __unicode__(self): + return self.s class MockView(APIView): - __doc__ = MockLazyStr("a gettext string") + __doc__ = MockLazyStr(u"a gettext string") - self.assertEqual(MockView().get_view_description(), 'a gettext string') + self.assertEqual(MockView().get_view_description(), u'a gettext string') def test_markdown(self): """ |
