Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
09f2bdd2
Commit
09f2bdd2
authored
Feb 22, 2013
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test for utf8 strings in docstrings of views.
parent
cf6c95de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
rest_framework/tests/description.py
+11
-0
No files found.
rest_framework/tests/description.py
View file @
09f2bdd2
# -- coding: utf-8 --
from
__future__
import
unicode_literals
from
django.test
import
TestCase
from
rest_framework.views
import
APIView
...
...
@@ -91,6 +93,15 @@ class TestViewNamesAndDescriptions(TestCase):
return
example
self
.
assertEquals
(
MockView
()
.
get_description
(),
example
)
def
test_resource_description_supports_unicode
(
self
):
class
MockView
(
APIView
):
"""Проверка"""
pass
self
.
assertEquals
(
MockView
()
.
get_description
(),
"Проверка"
)
def
test_resource_description_does_not_require_docstring
(
self
):
"""Ensure that empty docstrings do not affect the Resource's description if it has been set using the 'get_description' method."""
example
=
'Some other description'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment