From 09e59f268619927dc22f15fed97c3ceac05ea306 Mon Sep 17 00:00:00 2001 From: Tymur Maryokhin Date: Thu, 4 Dec 2014 02:50:25 +0100 Subject: Removed custom python_2_unicode_compatible. Closes #2183 --- tests/test_description.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/test_description.py') 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") -- cgit v1.2.3 From d54c67d79d0f5661ef33d860efe80a4272e22b3e Mon Sep 17 00:00:00 2001 From: Tymur Maryokhin Date: Thu, 4 Dec 2014 03:11:42 +0100 Subject: Removed custom StringIO, force_text, smart_text compat --- tests/test_description.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_description.py') diff --git a/tests/test_description.py b/tests/test_description.py index 6cd871ed..78ce2350 100644 --- a/tests/test_description.py +++ b/tests/test_description.py @@ -2,8 +2,8 @@ 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 django.utils.encoding import python_2_unicode_compatible, smart_text +from rest_framework.compat import apply_markdown from rest_framework.views import APIView from .description import ViewWithNonASCIICharactersInDocstring from .description import UTF8_TEST_DOCSTRING -- cgit v1.2.3