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/views.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/views.py')
| -rw-r--r-- | rest_framework/tests/views.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/rest_framework/tests/views.py b/rest_framework/tests/views.py new file mode 100644 index 00000000..fc00cc0b --- /dev/null +++ b/rest_framework/tests/views.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +from rest_framework.views import APIView + + +# test strings snatched from http://www.columbia.edu/~fdc/utf8/, +# http://winrus.com/utf8-jap.htm and memory +UTF8_TEST_DOCSTRING = ( + 'zażółć gęślą jaźń' + 'Sîne klâwen durh die wolken sint geslagen' + 'Τη γλώσσα μου έδωσαν ελληνική' + 'யாமறிந்த மொழிகளிலே தமிழ்மொழி' + 'На берегу пустынных волн' + 'てすと' + 'アイウエオカキクケコサシスセソタチツテ' +) + + +# Apparently there is an issue where docstrings of imported view classes +# do not retain their encoding information even if a module has a proper +# encoding declaration at the top of its source file. Therefore for tests +# to catch unicode related errors, a mock view has to be declared in a separate +# module. +class ViewWithNonASCIICharactersInDocstring(APIView): + __doc__ = UTF8_TEST_DOCSTRING |
