aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/tests/description.py
diff options
context:
space:
mode:
authorTom Christie2011-05-23 17:07:31 +0100
committerTom Christie2011-05-23 17:07:31 +0100
commitc53175914752502629141556f3e001e9d2e9f7fa (patch)
treed68bc4f0b2baeed2a90d6d20295423583603ba2b /djangorestframework/tests/description.py
parente7f8c06dbbbc9e4ae91327ee02cd8147777b17e2 (diff)
downloaddjango-rest-framework-c53175914752502629141556f3e001e9d2e9f7fa.tar.bz2
name and description
Diffstat (limited to 'djangorestframework/tests/description.py')
-rw-r--r--djangorestframework/tests/description.py42
1 files changed, 22 insertions, 20 deletions
diff --git a/djangorestframework/tests/description.py b/djangorestframework/tests/description.py
index d5a1102f..6c494efa 100644
--- a/djangorestframework/tests/description.py
+++ b/djangorestframework/tests/description.py
@@ -37,14 +37,15 @@ class TestViewNamesAndDescriptions(TestCase):
"""Ensure Resource names are based on the classname by default."""
class MockView(BaseView):
pass
- self.assertEquals(get_name(MockView()), 'Mock View')
+ self.assertEquals(get_name(MockView()), 'Mock')
- def test_resource_name_can_be_set_explicitly(self):
- """Ensure Resource names can be set using the 'name' class attribute."""
- example = 'Some Other Name'
- class MockView(BaseView):
- name = example
- self.assertEquals(get_name(MockView()), example)
+ # This has been turned off now.
+ #def test_resource_name_can_be_set_explicitly(self):
+ # """Ensure Resource names can be set using the 'name' class attribute."""
+ # example = 'Some Other Name'
+ # class MockView(BaseView):
+ # name = example
+ # self.assertEquals(get_name(MockView()), example)
def test_resource_description_uses_docstring_by_default(self):
"""Ensure Resource names are based on the docstring by default."""
@@ -66,20 +67,21 @@ class TestViewNamesAndDescriptions(TestCase):
self.assertEquals(get_description(MockView()), DESCRIPTION)
- def test_resource_description_can_be_set_explicitly(self):
- """Ensure Resource descriptions can be set using the 'description' class attribute."""
- example = 'Some other description'
- class MockView(BaseView):
- """docstring"""
- description = example
- self.assertEquals(get_description(MockView()), example)
+ # This has been turned off now
+ #def test_resource_description_can_be_set_explicitly(self):
+ # """Ensure Resource descriptions can be set using the 'description' class attribute."""
+ # example = 'Some other description'
+ # class MockView(BaseView):
+ # """docstring"""
+ # description = example
+ # self.assertEquals(get_description(MockView()), example)
- 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 'description' class attribute."""
- example = 'Some other description'
- class MockView(BaseView):
- description = example
- self.assertEquals(get_description(MockView()), example)
+ #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 'description' class attribute."""
+ # example = 'Some other description'
+ # class MockView(BaseView):
+ # description = example
+ # self.assertEquals(get_description(MockView()), example)
def test_resource_description_can_be_empty(self):
"""Ensure that if a resource has no doctring or 'description' class attribute, then it's description is the empty string"""