mirror of
https://github.com/django/django.git
synced 2025-10-29 08:36:09 +00:00
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
This commit is contained in:
@@ -114,7 +114,8 @@ class ViewTest(LoggingAssertionMixin, SimpleTestCase):
|
||||
|
||||
def test_get_and_head(self):
|
||||
"""
|
||||
Test a view which supplies a GET method also responds correctly to HEAD.
|
||||
Test a view which supplies a GET method also responds correctly to
|
||||
HEAD.
|
||||
"""
|
||||
self._assert_simple(SimpleView.as_view()(self.rf.get("/")))
|
||||
response = SimpleView.as_view()(self.rf.head("/"))
|
||||
@@ -129,7 +130,8 @@ class ViewTest(LoggingAssertionMixin, SimpleTestCase):
|
||||
|
||||
def test_head_no_get(self):
|
||||
"""
|
||||
Test a view which supplies no GET method responds to HEAD with HTTP 405.
|
||||
Test a view which supplies no GET method responds to HEAD with HTTP
|
||||
405.
|
||||
"""
|
||||
response = PostOnlyView.as_view()(self.rf.head("/"))
|
||||
self.assertEqual(response.status_code, 405)
|
||||
@@ -608,7 +610,8 @@ class GetContextDataTest(SimpleTestCase):
|
||||
self.assertEqual(context["pony"], test_view.object)
|
||||
|
||||
def test_object_in_get_context_data(self):
|
||||
# Checks 'object' key presence in dict returned by get_context_date #20234
|
||||
# Checks 'object' key presence in dict returned by get_context_date
|
||||
# #20234
|
||||
test_view = views.CustomSingleObjectView()
|
||||
context = test_view.get_context_data()
|
||||
self.assertEqual(context["object"], test_view.object)
|
||||
|
||||
Reference in New Issue
Block a user