[4.0.x] Refs #32956 -- Capitalized HTTP/HTTPS in comments, docs, and docstrings.
Backport of 7ef0bc922c
from main
This commit is contained in:
parent
ea66d1f2ae
commit
5d62beb61a
|
@ -1472,7 +1472,7 @@ class _MediaFilesHandler(FSFilesHandler):
|
||||||
|
|
||||||
|
|
||||||
class LiveServerThread(threading.Thread):
|
class LiveServerThread(threading.Thread):
|
||||||
"""Thread for running a live http server while the tests are running."""
|
"""Thread for running a live HTTP server while the tests are running."""
|
||||||
|
|
||||||
server_class = ThreadedWSGIServer
|
server_class = ThreadedWSGIServer
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ The following mixins are used to construct Django's editing views:
|
||||||
|
|
||||||
.. class:: django.views.generic.edit.DeletionMixin
|
.. class:: django.views.generic.edit.DeletionMixin
|
||||||
|
|
||||||
Enables handling of the ``DELETE`` http action.
|
Enables handling of the ``DELETE`` HTTP action.
|
||||||
|
|
||||||
**Methods and Attributes**
|
**Methods and Attributes**
|
||||||
|
|
||||||
|
|
|
@ -271,10 +271,10 @@ of :exc:`IntegrityError`.
|
||||||
|
|
||||||
.. currentmodule:: django.http
|
.. currentmodule:: django.http
|
||||||
|
|
||||||
Http Exceptions
|
HTTP Exceptions
|
||||||
===============
|
===============
|
||||||
|
|
||||||
Http exceptions may be imported from ``django.http``.
|
HTTP exceptions may be imported from ``django.http``.
|
||||||
|
|
||||||
``UnreadablePostError``
|
``UnreadablePostError``
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
|
@ -289,9 +289,7 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
|
||||||
self.assertEqual(response.status_code, 302) # redirect somewhere
|
self.assertEqual(response.status_code, 302) # redirect somewhere
|
||||||
|
|
||||||
def test_popup_add_POST(self):
|
def test_popup_add_POST(self):
|
||||||
"""
|
"""HTTP response from a popup is properly escaped."""
|
||||||
Ensure http response from a popup is properly escaped.
|
|
||||||
"""
|
|
||||||
post_data = {
|
post_data = {
|
||||||
IS_POPUP_VAR: '1',
|
IS_POPUP_VAR: '1',
|
||||||
'title': 'title with a new\nline',
|
'title': 'title with a new\nline',
|
||||||
|
|
|
@ -89,7 +89,7 @@ class ViewTest(SimpleTestCase):
|
||||||
|
|
||||||
def test_pathological_http_method(self):
|
def test_pathological_http_method(self):
|
||||||
"""
|
"""
|
||||||
The edge case of an http request that spoofs an existing method name is
|
The edge case of an HTTP request that spoofs an existing method name is
|
||||||
caught.
|
caught.
|
||||||
"""
|
"""
|
||||||
self.assertEqual(SimpleView.as_view()(
|
self.assertEqual(SimpleView.as_view()(
|
||||||
|
|
|
@ -360,12 +360,12 @@ class ClientTest(TestCase):
|
||||||
self.assertContains(response, '30 is the value')
|
self.assertContains(response, '30 is the value')
|
||||||
|
|
||||||
def test_redirect_http(self):
|
def test_redirect_http(self):
|
||||||
"GET a URL that redirects to an http URI"
|
"""GET a URL that redirects to an HTTP URI."""
|
||||||
response = self.client.get('/http_redirect_view/', follow=True)
|
response = self.client.get('/http_redirect_view/', follow=True)
|
||||||
self.assertFalse(response.test_was_secure_request)
|
self.assertFalse(response.test_was_secure_request)
|
||||||
|
|
||||||
def test_redirect_https(self):
|
def test_redirect_https(self):
|
||||||
"GET a URL that redirects to an https URI"
|
"""GET a URL that redirects to an HTTPS URI."""
|
||||||
response = self.client.get('/https_redirect_view/', follow=True)
|
response = self.client.get('/https_redirect_view/', follow=True)
|
||||||
self.assertTrue(response.test_was_secure_request)
|
self.assertTrue(response.test_was_secure_request)
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ class SetLanguageTests(TestCase):
|
||||||
def test_setlang_http_next(self):
|
def test_setlang_http_next(self):
|
||||||
"""
|
"""
|
||||||
The set_language view only redirects to the 'next' argument if it is
|
The set_language view only redirects to the 'next' argument if it is
|
||||||
"safe" and its scheme is https if the request was sent over https.
|
"safe" and its scheme is HTTPS if the request was sent over HTTPS.
|
||||||
"""
|
"""
|
||||||
lang_code = self._get_inactive_language_code()
|
lang_code = self._get_inactive_language_code()
|
||||||
non_https_next_url = 'http://testserver/redirection/'
|
non_https_next_url = 'http://testserver/redirection/'
|
||||||
|
|
Loading…
Reference in New Issue