From 3ee18400ae9b916da1a3bee9c9c630fd223a2d3c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Tue, 3 Nov 2015 11:55:10 +0200
Subject: [PATCH] Fixed #25668 -- Misc spelling errors

---
 django/core/cache/backends/base.py | 2 +-
 django/test/testcases.py           | 2 +-
 django/utils/encoding.py           | 2 +-
 django/utils/termcolors.py         | 4 ++--
 tests/admin_utils/tests.py         | 2 +-
 tests/db_functions/tests.py        | 4 ++--
 tests/foreign_object/tests.py      | 2 +-
 tests/i18n/test_extraction.py      | 2 +-
 tests/i18n/tests.py                | 2 +-
 tests/test_client_regress/tests.py | 4 ++--
 tests/timezones/tests.py           | 2 +-
 tests/urlpatterns_reverse/tests.py | 8 ++++----
 12 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/django/core/cache/backends/base.py b/django/core/cache/backends/base.py
index 7835c9793a..186a45ddd6 100644
--- a/django/core/cache/backends/base.py
+++ b/django/core/cache/backends/base.py
@@ -259,7 +259,7 @@ class BaseCache(object):
         return version + delta
 
     def decr_version(self, key, delta=1, version=None):
-        """Substracts delta from the cache version for the supplied key. Returns
+        """Subtracts delta from the cache version for the supplied key. Returns
         the new version.
         """
         return self.incr_version(key, -delta, version)
diff --git a/django/test/testcases.py b/django/test/testcases.py
index 7bfe9ea18f..2acacd5a91 100644
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -966,7 +966,7 @@ class TestCase(TransactionTestCase):
     Similar to TransactionTestCase, but uses `transaction.atomic()` to achieve
     test isolation.
 
-    In most situation, TestCase should be prefered to TransactionTestCase as
+    In most situations, TestCase should be preferred to TransactionTestCase as
     it allows faster execution. However, there are some situations where using
     TransactionTestCase might be necessary (e.g. testing some transactional
     behavior).
diff --git a/django/utils/encoding.py b/django/utils/encoding.py
index 48fde393a7..6bc285d899 100644
--- a/django/utils/encoding.py
+++ b/django/utils/encoding.py
@@ -223,7 +223,7 @@ def escape_uri_path(path):
     #   reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","
     #   unreserved  = alphanum | mark
     #   mark        = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
-    # The list of safe characters here is constructed substracting ";", "=",
+    # The list of safe characters here is constructed subtracting ";", "=",
     # and "?" according to section 3.3 of RFC 2396.
     # The reason for not subtracting and escaping "/" is that we are escaping
     # the entire path, not a path segment.
diff --git a/django/utils/termcolors.py b/django/utils/termcolors.py
index 507b25dd77..4924918e25 100644
--- a/django/utils/termcolors.py
+++ b/django/utils/termcolors.py
@@ -144,7 +144,7 @@ DEFAULT_PALETTE = DARK_PALETTE
 def parse_color_setting(config_string):
     """Parse a DJANGO_COLORS environment variable to produce the system palette
 
-    The general form of a pallete definition is:
+    The general form of a palette definition is:
 
         "palette;role=fg;role=fg/bg;role=fg,option,option;role=fg/bg,option,option"
 
@@ -156,7 +156,7 @@ def parse_color_setting(config_string):
         option is a display options.
 
     Specifying a named palette is the same as manually specifying the individual
-    definitions for each role. Any individual definitions following the pallete
+    definitions for each role. Any individual definitions following the palette
     definition will augment the base palette definition.
 
     Valid roles:
diff --git a/tests/admin_utils/tests.py b/tests/admin_utils/tests.py
index 7fb490dd2a..069433fd7d 100644
--- a/tests/admin_utils/tests.py
+++ b/tests/admin_utils/tests.py
@@ -186,7 +186,7 @@ class UtilsTests(SimpleTestCase):
         self.assertEqual(display_value, '12345')
 
     @override_settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True)
-    def test_number_formats_with_thousand_seperator_display_for_field(self):
+    def test_number_formats_with_thousand_separator_display_for_field(self):
         display_value = display_for_field(12345.6789, models.FloatField(), self.empty_value)
         self.assertEqual(display_value, '12,345.6789')
 
diff --git a/tests/db_functions/tests.py b/tests/db_functions/tests.py
index 491ce6cefe..b6ab915d4d 100644
--- a/tests/db_functions/tests.py
+++ b/tests/db_functions/tests.py
@@ -136,7 +136,7 @@ class FunctionTests(TestCase):
         self.assertEqual(articles.first().last_updated, now)
 
     @skipIfDBFeature('greatest_least_ignores_nulls')
-    def test_greatest_propogates_null(self):
+    def test_greatest_propagates_null(self):
         now = timezone.now()
 
         Article.objects.create(title="Testing with Django", written=now)
@@ -231,7 +231,7 @@ class FunctionTests(TestCase):
         self.assertEqual(articles.first().first_updated, now)
 
     @skipIfDBFeature('greatest_least_ignores_nulls')
-    def test_least_propogates_null(self):
+    def test_least_propagates_null(self):
         now = timezone.now()
 
         Article.objects.create(title="Testing with Django", written=now)
diff --git a/tests/foreign_object/tests.py b/tests/foreign_object/tests.py
index 5188645325..90d7b34721 100644
--- a/tests/foreign_object/tests.py
+++ b/tests/foreign_object/tests.py
@@ -292,7 +292,7 @@ class MultiColumnFKTests(TestCase):
 
         self.assertQuerysetEqual(self.jane.friends.all(), [])
 
-    def test_prefetch_related_m2m_foward_works(self):
+    def test_prefetch_related_m2m_forward_works(self):
         Membership.objects.create(membership_country=self.usa, person=self.bob, group=self.cia)
         Membership.objects.create(membership_country=self.usa, person=self.jim, group=self.democrat)
 
diff --git a/tests/i18n/test_extraction.py b/tests/i18n/test_extraction.py
index e26ec29e43..f72aa00771 100644
--- a/tests/i18n/test_extraction.py
+++ b/tests/i18n/test_extraction.py
@@ -143,7 +143,7 @@ class ExtractorTests(SerializeMixin, SimpleTestCase):
 
         None can be passed for the line_number argument to skip checking of
         the :42 suffix part.
-        A string token can also be pased as line_number, in which case it
+        A string token can also be passed as line_number, in which case it
         will be searched in the template, and its line number will be used.
         A msgid is a suitable candidate.
         """
diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py
index 7d7d7210ab..c01098eab1 100644
--- a/tests/i18n/tests.py
+++ b/tests/i18n/tests.py
@@ -1750,7 +1750,7 @@ class LocaleMiddlewareTests(TestCase):
     LANGUAGES=[
         ('bg', 'Bulgarian'),
         ('en-us', 'English'),
-        ('pt-br', 'Portugese (Brazil)'),
+        ('pt-br', 'Portuguese (Brazil)'),
     ],
     MIDDLEWARE_CLASSES=[
         'django.middleware.locale.LocaleMiddleware',
diff --git a/tests/test_client_regress/tests.py b/tests/test_client_regress/tests.py
index 0e0892e4e4..5897efa4bb 100644
--- a/tests/test_client_regress/tests.py
+++ b/tests/test_client_regress/tests.py
@@ -181,7 +181,7 @@ class AssertContainsTests(SimpleTestCase):
         self.assertNotContains(r, ugettext_lazy('never'))
 
     def test_assert_contains_renders_template_response(self):
-        """ Test that we can pass in an unrendered SimpleTemplateReponse
+        """ Test that we can pass in an unrendered SimpleTemplateResponse
             without throwing an error.
             Refs #15826.
         """
@@ -198,7 +198,7 @@ class AssertContainsTests(SimpleTestCase):
         self.assertContains(response, 'Hello')
 
     def test_assert_not_contains_renders_template_response(self):
-        """ Test that we can pass in an unrendered SimpleTemplateReponse
+        """ Test that we can pass in an unrendered SimpleTemplateResponse
             without throwing an error.
             Refs #15826.
         """
diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py
index 7f550baf6c..57c71d995c 100644
--- a/tests/timezones/tests.py
+++ b/tests/timezones/tests.py
@@ -676,7 +676,7 @@ class SerializationTests(SimpleTestCase):
     # Backend-specific notes:
     # - JSON supports only milliseconds, microseconds will be truncated.
     # - PyYAML dumps the UTC offset correctly for timezone-aware datetimes,
-    #   but when it loads this representation, it substracts the offset and
+    #   but when it loads this representation, it subtracts the offset and
     #   returns a naive datetime object in UTC (http://pyyaml.org/ticket/202).
     # Tests are adapted to take these quirks into account.
 
diff --git a/tests/urlpatterns_reverse/tests.py b/tests/urlpatterns_reverse/tests.py
index 799c7c32a2..93e86df71e 100644
--- a/tests/urlpatterns_reverse/tests.py
+++ b/tests/urlpatterns_reverse/tests.py
@@ -760,20 +760,20 @@ class NamespaceTests(SimpleTestCase):
         "current_app should either match the whole path or shouldn't be used"
         self.assertEqual(
             '/ns-included1/test4/inner/',
-            reverse('inc-ns1:testapp:urlobject-view', current_app='non-existant:test-ns3')
+            reverse('inc-ns1:testapp:urlobject-view', current_app='non-existent:test-ns3')
         )
         self.assertEqual(
             '/ns-included1/test4/inner/37/42/',
-            reverse('inc-ns1:testapp:urlobject-view', args=[37, 42], current_app='non-existant:test-ns3')
+            reverse('inc-ns1:testapp:urlobject-view', args=[37, 42], current_app='non-existent:test-ns3')
         )
         self.assertEqual(
             '/ns-included1/test4/inner/42/37/',
             reverse('inc-ns1:testapp:urlobject-view', kwargs={'arg1': 42, 'arg2': 37},
-                    current_app='non-existant:test-ns3')
+                    current_app='non-existent:test-ns3')
         )
         self.assertEqual(
             '/ns-included1/test4/inner/+%5C$*/',
-            reverse('inc-ns1:testapp:urlobject-special-view', current_app='non-existant:test-ns3')
+            reverse('inc-ns1:testapp:urlobject-special-view', current_app='non-existent:test-ns3')
         )