diff options
author | za <za@python.or.id> | 2016-10-27 14:53:39 +0700 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-11-10 21:30:21 -0500 |
commit | 321e94fa41b121f65c02119c02098df327bbd569 (patch) | |
tree | ce5476c191d589aca4b124f841dfbccac8dd299f /tests/generic_views | |
parent | 4bb70cbcc60794f515c9bfefeca87b8272d33c0c (diff) | |
download | django-321e94fa41b121f65c02119c02098df327bbd569.tar.gz |
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
Diffstat (limited to 'tests/generic_views')
-rw-r--r-- | tests/generic_views/test_base.py | 18 | ||||
-rw-r--r-- | tests/generic_views/test_dates.py | 5 | ||||
-rw-r--r-- | tests/generic_views/test_list.py | 2 |
3 files changed, 12 insertions, 13 deletions
diff --git a/tests/generic_views/test_base.py b/tests/generic_views/test_base.py index db4ef604fa..a667a4e495 100644 --- a/tests/generic_views/test_base.py +++ b/tests/generic_views/test_base.py @@ -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() diff --git a/tests/generic_views/test_dates.py b/tests/generic_views/test_dates.py index af7a04c9a6..9b7c20ec73 100644 --- a/tests/generic_views/test_dates.py +++ b/tests/generic_views/test_dates.py @@ -670,9 +670,8 @@ class DateDetailViewTests(TestDataMixin, TestCase): def test_get_object_custom_queryset(self): """ - Ensure that custom querysets are used when provided to - BaseDateDetailView.get_object() - Refs #16918. + Custom querysets are used when provided to + BaseDateDetailView.get_object(). """ res = self.client.get( '/dates/books/get_object_custom_queryset/2006/may/01/%s/' % self.book2.pk) diff --git a/tests/generic_views/test_list.py b/tests/generic_views/test_list.py index 81993eaac0..5a22abd33b 100644 --- a/tests/generic_views/test_list.py +++ b/tests/generic_views/test_list.py @@ -59,7 +59,7 @@ class ListViewTests(TestCase): self.assertEqual(list(res.context['author_list'])[-1].name, 'Author 29') def test_paginated_queryset_shortdata(self): - # Test that short datasets ALSO result in a paginated view. + # Short datasets also result in a paginated view. res = self.client.get('/list/authors/paginated/') self.assertEqual(res.status_code, 200) self.assertTemplateUsed(res, 'generic_views/author_list.html') |