Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.

This commit is contained in:
za 2016-10-27 14:53:39 +07:00 committed by Tim Graham
parent 4bb70cbcc6
commit 321e94fa41
185 changed files with 1216 additions and 1528 deletions

View file

@ -76,14 +76,14 @@ class ViewTest(unittest.TestCase):
def test_no_init_kwargs(self):
"""
Test that a view can't be accidentally instantiated before deployment
A view can't be accidentally instantiated before deployment
"""
with self.assertRaises(AttributeError):
SimpleView(key='value').as_view()
def test_no_init_args(self):
"""
Test that a view can't be accidentally instantiated before deployment
A view can't be accidentally instantiated before deployment
"""
with self.assertRaises(TypeError):
SimpleView.as_view('value')
@ -133,7 +133,7 @@ class ViewTest(unittest.TestCase):
def test_invalid_keyword_argument(self):
"""
Test that view arguments must be predefined on the class and can't
View arguments must be predefined on the class and can't
be named like a HTTP method.
"""
# Check each of the allowed method names
@ -158,7 +158,7 @@ class ViewTest(unittest.TestCase):
def test_class_attributes(self):
"""
Test that the callable returned from as_view() has proper
The callable returned from as_view() has proper
docstring, name and module.
"""
self.assertEqual(SimpleView.__doc__, SimpleView.as_view().__doc__)
@ -167,14 +167,14 @@ class ViewTest(unittest.TestCase):
def test_dispatch_decoration(self):
"""
Test that attributes set by decorators on the dispatch method
Attributes set by decorators on the dispatch method
are also present on the closure.
"""
self.assertTrue(DecoratedDispatchView.as_view().is_decorated)
def test_options(self):
"""
Test that views respond to HTTP OPTIONS requests with an Allow header
Views respond to HTTP OPTIONS requests with an Allow header
appropriate for the methods implemented by the view class.
"""
request = self.rf.options('/')
@ -185,7 +185,7 @@ class ViewTest(unittest.TestCase):
def test_options_for_get_view(self):
"""
Test that a view implementing GET allows GET and HEAD.
A view implementing GET allows GET and HEAD.
"""
request = self.rf.options('/')
view = SimpleView.as_view()
@ -194,7 +194,7 @@ class ViewTest(unittest.TestCase):
def test_options_for_get_and_post_view(self):
"""
Test that a view implementing GET and POST allows GET, HEAD, and POST.
A view implementing GET and POST allows GET, HEAD, and POST.
"""
request = self.rf.options('/')
view = SimplePostView.as_view()
@ -203,7 +203,7 @@ class ViewTest(unittest.TestCase):
def test_options_for_post_view(self):
"""
Test that a view implementing POST allows POST.
A view implementing POST allows POST.
"""
request = self.rf.options('/')
view = PostOnlyView.as_view()