summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2021-10-19 20:01:44 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-10-20 09:11:04 +0200
commit5d62beb61a7d5a6bb2755d2cdabc8e31f462391f (patch)
tree7a0843e74be73d6fa2a84a9357874fc3bb1b2237
parentea66d1f2ae0053ddbb0c9e0f725dd78cbf70a249 (diff)
[4.0.x] Refs #32956 -- Capitalized HTTP/HTTPS in comments, docs, and docstrings.
Backport of 7ef0bc922c0a78667ed8cbf5f85845b627ccbdf8 from main
-rw-r--r--django/test/testcases.py2
-rw-r--r--docs/ref/class-based-views/mixins-editing.txt2
-rw-r--r--docs/ref/exceptions.txt4
-rw-r--r--tests/admin_views/tests.py4
-rw-r--r--tests/generic_views/test_base.py2
-rw-r--r--tests/test_client/tests.py4
-rw-r--r--tests/view_tests/tests/test_i18n.py2
7 files changed, 9 insertions, 11 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py
index 41d01b89b4..b56e8f5edf 100644
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -1472,7 +1472,7 @@ class _MediaFilesHandler(FSFilesHandler):
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
diff --git a/docs/ref/class-based-views/mixins-editing.txt b/docs/ref/class-based-views/mixins-editing.txt
index d0bb200ae3..aebbae04ae 100644
--- a/docs/ref/class-based-views/mixins-editing.txt
+++ b/docs/ref/class-based-views/mixins-editing.txt
@@ -218,7 +218,7 @@ The following mixins are used to construct Django's editing views:
.. class:: django.views.generic.edit.DeletionMixin
- Enables handling of the ``DELETE`` http action.
+ Enables handling of the ``DELETE`` HTTP action.
**Methods and Attributes**
diff --git a/docs/ref/exceptions.txt b/docs/ref/exceptions.txt
index 1b22368e77..8e8fe4347a 100644
--- a/docs/ref/exceptions.txt
+++ b/docs/ref/exceptions.txt
@@ -271,10 +271,10 @@ of :exc:`IntegrityError`.
.. currentmodule:: django.http
-Http Exceptions
+HTTP Exceptions
===============
-Http exceptions may be imported from ``django.http``.
+HTTP exceptions may be imported from ``django.http``.
``UnreadablePostError``
-----------------------
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 337b5469f7..1eab343009 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -289,9 +289,7 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
self.assertEqual(response.status_code, 302) # redirect somewhere
def test_popup_add_POST(self):
- """
- Ensure http response from a popup is properly escaped.
- """
+ """HTTP response from a popup is properly escaped."""
post_data = {
IS_POPUP_VAR: '1',
'title': 'title with a new\nline',
diff --git a/tests/generic_views/test_base.py b/tests/generic_views/test_base.py
index 661b9941ea..95b03681cc 100644
--- a/tests/generic_views/test_base.py
+++ b/tests/generic_views/test_base.py
@@ -89,7 +89,7 @@ class ViewTest(SimpleTestCase):
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.
"""
self.assertEqual(SimpleView.as_view()(
diff --git a/tests/test_client/tests.py b/tests/test_client/tests.py
index e8ac4bfc00..f138cc69b3 100644
--- a/tests/test_client/tests.py
+++ b/tests/test_client/tests.py
@@ -360,12 +360,12 @@ class ClientTest(TestCase):
self.assertContains(response, '30 is the value')
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)
self.assertFalse(response.test_was_secure_request)
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)
self.assertTrue(response.test_was_secure_request)
diff --git a/tests/view_tests/tests/test_i18n.py b/tests/view_tests/tests/test_i18n.py
index 63e9ef76c6..bfc31d9c70 100644
--- a/tests/view_tests/tests/test_i18n.py
+++ b/tests/view_tests/tests/test_i18n.py
@@ -58,7 +58,7 @@ class SetLanguageTests(TestCase):
def test_setlang_http_next(self):
"""
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()
non_https_next_url = 'http://testserver/redirection/'