summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2021-10-18 17:06:00 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-10-19 06:33:00 +0200
commit6aa917383faaa80e70c6a8a8bc0f52f088434a84 (patch)
tree266a920665a19e685cd1809e276b234f444e0b39 /tests
parentc067a2b68fe2701608b34ac4a538e1f9dba0e9f2 (diff)
[4.0.x] Refs #32956 -- Changed docs to treat the acronym HTTP phonetically.
Backport of 69b0736fad1d1f0197409ca025b7bcdf5666ae62 from main
Diffstat (limited to 'tests')
-rw-r--r--tests/generic_views/test_base.py5
-rw-r--r--tests/get_object_or_404/tests.py6
-rw-r--r--tests/servers/tests.py2
3 files changed, 7 insertions, 6 deletions
diff --git a/tests/generic_views/test_base.py b/tests/generic_views/test_base.py
index 5872ecf3db..661b9941ea 100644
--- a/tests/generic_views/test_base.py
+++ b/tests/generic_views/test_base.py
@@ -89,7 +89,8 @@ class ViewTest(SimpleTestCase):
def test_pathological_http_method(self):
"""
- The edge case of a http request that spoofs an existing method name is caught.
+ The edge case of an http request that spoofs an existing method name is
+ caught.
"""
self.assertEqual(SimpleView.as_view()(
self.rf.get('/', REQUEST_METHOD='DISPATCH')
@@ -140,7 +141,7 @@ class ViewTest(SimpleTestCase):
def test_invalid_keyword_argument(self):
"""
View arguments must be predefined on the class and can't
- be named like a HTTP method.
+ be named like an HTTP method.
"""
msg = (
'The method name %s is not accepted as a keyword argument to '
diff --git a/tests/get_object_or_404/tests.py b/tests/get_object_or_404/tests.py
index 075f9a08e1..71815d34ef 100644
--- a/tests/get_object_or_404/tests.py
+++ b/tests/get_object_or_404/tests.py
@@ -10,7 +10,7 @@ class GetObjectOr404Tests(TestCase):
a1 = Author.objects.create(name="Brave Sir Robin")
a2 = Author.objects.create(name="Patsy")
- # No Articles yet, so we should get a Http404 error.
+ # No Articles yet, so we should get an Http404 error.
with self.assertRaises(Http404):
get_object_or_404(Article, title="Foo")
@@ -28,7 +28,7 @@ class GetObjectOr404Tests(TestCase):
article
)
- # No articles containing "Camelot". This should raise a Http404 error.
+ # No articles containing "Camelot". This should raise an Http404 error.
with self.assertRaises(Http404):
get_object_or_404(a1.article_set, title__contains="Camelot")
@@ -50,7 +50,7 @@ class GetObjectOr404Tests(TestCase):
with self.assertRaises(Author.MultipleObjectsReturned):
get_object_or_404(Author.objects.all())
- # Using an empty QuerySet raises a Http404 error.
+ # Using an empty QuerySet raises an Http404 error.
with self.assertRaises(Http404):
get_object_or_404(Article.objects.none(), title__contains="Run")
diff --git a/tests/servers/tests.py b/tests/servers/tests.py
index c4b8298fd8..8f21f85918 100644
--- a/tests/servers/tests.py
+++ b/tests/servers/tests.py
@@ -173,7 +173,7 @@ class LiveServerViews(LiveServerBase):
def test_closes_connection_without_content_length(self):
"""
- A HTTP 1.1 server is supposed to support keep-alive. Since our
+ An HTTP 1.1 server is supposed to support keep-alive. Since our
development server is rather simple we support it only in cases where
we can detect a content length from the response. This should be doable
for all simple views and streaming responses where an iterable with