aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/test_description.py
diff options
context:
space:
mode:
authorTom Christie2013-08-19 07:40:30 +0100
committerTom Christie2013-08-19 07:40:30 +0100
commita8aabe23c94b1281ac8ca752a09555c1b0ef163d (patch)
treeafcf5191bb5d2107747c3f82a1801e2e602808c1 /rest_framework/tests/test_description.py
parentc1ccd8b5b5aef1bd209862f9431c9c03e25ae755 (diff)
parent5a374955b14e1f1fdc85f0fa68284dbf6b83ab5f (diff)
downloaddjango-rest-framework-a8aabe23c94b1281ac8ca752a09555c1b0ef163d.tar.bz2
Merge branch 'master' of git://github.com/chrispaolini/django-rest-framework into chrispaolini-master
Diffstat (limited to 'rest_framework/tests/test_description.py')
-rw-r--r--rest_framework/tests/test_description.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/rest_framework/tests/test_description.py b/rest_framework/tests/test_description.py
index 8019f5ec..4c03c1de 100644
--- a/rest_framework/tests/test_description.py
+++ b/rest_framework/tests/test_description.py
@@ -6,7 +6,6 @@ from rest_framework.compat import apply_markdown, smart_text
from rest_framework.views import APIView
from rest_framework.tests.description import ViewWithNonASCIICharactersInDocstring
from rest_framework.tests.description import UTF8_TEST_DOCSTRING
-from rest_framework.utils.formatting import get_view_name, get_view_description
# We check that docstrings get nicely un-indented.
DESCRIPTION = """an example docstring
@@ -58,7 +57,7 @@ class TestViewNamesAndDescriptions(TestCase):
"""
class MockView(APIView):
pass
- self.assertEqual(get_view_name(MockView), 'Mock')
+ self.assertEqual(MockView().get_view_name(), 'Mock')
def test_view_description_uses_docstring(self):
"""Ensure view descriptions are based on the docstring."""
@@ -78,7 +77,7 @@ class TestViewNamesAndDescriptions(TestCase):
# hash style header #"""
- self.assertEqual(get_view_description(MockView), DESCRIPTION)
+ self.assertEqual(MockView().get_view_description(), DESCRIPTION)
def test_view_description_supports_unicode(self):
"""
@@ -86,7 +85,7 @@ class TestViewNamesAndDescriptions(TestCase):
"""
self.assertEqual(
- get_view_description(ViewWithNonASCIICharactersInDocstring),
+ ViewWithNonASCIICharactersInDocstring().get_view_description(),
smart_text(UTF8_TEST_DOCSTRING)
)
@@ -97,7 +96,7 @@ class TestViewNamesAndDescriptions(TestCase):
"""
class MockView(APIView):
pass
- self.assertEqual(get_view_description(MockView), '')
+ self.assertEqual(MockView().get_view_description(), '')
def test_markdown(self):
"""