diff options
| author | Tom Christie | 2013-06-26 22:41:52 +0100 |
|---|---|---|
| committer | Tom Christie | 2013-06-26 22:41:52 +0100 |
| commit | b564008a0199f0bf7b6087fa094876ec57c4f764 (patch) | |
| tree | 7912456fee96ff3708a9277d2943765448db78cb /rest_framework/tests/test_description.py | |
| parent | 494703fc8e916a9b7a318ec8bc7d774ef31de14e (diff) | |
| parent | 35e4d1cf9cdc71d1ac6501feb0337d27a1cf946e (diff) | |
| download | django-rest-framework-b564008a0199f0bf7b6087fa094876ec57c4f764.tar.bz2 | |
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
Diffstat (limited to 'rest_framework/tests/test_description.py')
| -rw-r--r-- | rest_framework/tests/test_description.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/rest_framework/tests/test_description.py b/rest_framework/tests/test_description.py index 52c1a34c..bc86e106 100644 --- a/rest_framework/tests/test_description.py +++ b/rest_framework/tests/test_description.py @@ -3,8 +3,10 @@ from __future__ import unicode_literals from django.test import TestCase from rest_framework.views import APIView -from rest_framework.compat import apply_markdown +from rest_framework.compat import apply_markdown, smart_text from rest_framework.utils.formatting import get_view_name, get_view_description +from rest_framework.tests.views import ( + ViewWithNonASCIICharactersInDocstring, UTF8_TEST_DOCSTRING) # We check that docstrings get nicely un-indented. DESCRIPTION = """an example docstring @@ -83,11 +85,10 @@ class TestViewNamesAndDescriptions(TestCase): Unicode in docstrings should be respected. """ - class MockView(APIView): - """Проверка""" - pass - - self.assertEqual(get_view_description(MockView), "Проверка") + self.assertEqual( + get_view_description(ViewWithNonASCIICharactersInDocstring), + smart_text(UTF8_TEST_DOCSTRING) + ) def test_view_description_can_be_empty(self): """ |
