summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Soref <jsoref@users.noreply.github.com>2015-12-02 23:55:50 +0000
committerTim Graham <timograham@gmail.com>2016-02-23 10:27:15 -0500
commit751e5fcaf7b1824c67676e8bfa6989872457bbbf (patch)
tree545fb7d66628c387d3c1fe7a779b7cf6ebae8794
parent2d321d2393ebf5a8d69604d857fd7df77887ccf7 (diff)
downloaddjango-751e5fcaf7b1824c67676e8bfa6989872457bbbf.tar.gz
[1.8.x] Fixed many spelling mistakes in code, comments, and docs.
Partial backport of 93452a70e8a62c7408eeded444f5088d4a26212d from master
-rw-r--r--django/contrib/admin/actions.py2
-rw-r--r--django/contrib/auth/context_processors.py2
-rw-r--r--django/contrib/gis/db/backends/postgis/models.py2
-rw-r--r--django/contrib/gis/db/models/query.py2
-rw-r--r--django/contrib/gis/gdal/geomtype.py2
-rw-r--r--django/contrib/gis/sitemaps/kml.py2
-rw-r--r--django/db/models/expressions.py2
-rw-r--r--django/template/defaultfilters.py2
-rw-r--r--django/template/defaulttags.py2
-rw-r--r--docs/_theme/djangodocs/static/djangodocs.css2
-rw-r--r--docs/conf.py2
-rw-r--r--docs/ref/contrib/syndication.txt2
-rw-r--r--docs/spelling_wordlist1
-rw-r--r--tests/admin_changelist/tests.py2
-rw-r--r--tests/aggregation_regress/tests.py4
-rw-r--r--tests/auth_tests/test_forms.py2
-rw-r--r--tests/auth_tests/test_views.py10
-rw-r--r--tests/check_framework/test_security.py6
-rw-r--r--tests/expressions_case/tests.py2
-rw-r--r--tests/forms_tests/tests/test_forms.py2
-rw-r--r--tests/forms_tests/tests/tests.py2
-rw-r--r--tests/httpwrappers/tests.py2
-rw-r--r--tests/i18n/commands/__init__.py2
-rw-r--r--tests/invalid_models_tests/test_models.py2
-rw-r--r--tests/m2m_through/tests.py8
-rw-r--r--tests/middleware/tests.py4
-rw-r--r--tests/migrations/test_writer.py8
-rw-r--r--tests/model_fields/models.py8
-rw-r--r--tests/model_options/test_default_related_name.py2
-rw-r--r--tests/modeladmin/tests.py2
-rw-r--r--tests/null_fk_ordering/models.py4
-rw-r--r--tests/proxy_models/tests.py2
-rw-r--r--tests/queries/models.py2
-rw-r--r--tests/queries/tests.py6
-rw-r--r--tests/queryset_pickle/tests.py2
-rw-r--r--tests/requests/tests.py6
-rw-r--r--tests/serializers_regress/tests.py2
-rw-r--r--tests/signals/tests.py2
-rw-r--r--tests/staticfiles_tests/test_liveserver.py2
-rw-r--r--tests/template_tests/test_response.py4
-rw-r--r--tests/test_runner/test_discover_runner.py6
-rw-r--r--tests/timezones/tests.py2
-rw-r--r--tests/unmanaged_models/models.py2
-rw-r--r--tests/utils_tests/files/strip_tags2.txt2
-rw-r--r--tests/utils_tests/test_http.py4
45 files changed, 71 insertions, 70 deletions
diff --git a/django/contrib/admin/actions.py b/django/contrib/admin/actions.py
index 4445dd52fd..c4cccfd990 100644
--- a/django/contrib/admin/actions.py
+++ b/django/contrib/admin/actions.py
@@ -16,7 +16,7 @@ def delete_selected(modeladmin, request, queryset):
"""
Default action which deletes the selected objects.
- This action first displays a confirmation page whichs shows all the
+ This action first displays a confirmation page which shows all the
deleteable objects, or, if the user has no permission one of the related
childs (foreignkeys), a "permission denied" message.
diff --git a/django/contrib/auth/context_processors.py b/django/contrib/auth/context_processors.py
index 474002e550..ce1e42d574 100644
--- a/django/contrib/auth/context_processors.py
+++ b/django/contrib/auth/context_processors.py
@@ -13,7 +13,7 @@ class PermLookupDict(object):
return self.user.has_perm("%s.%s" % (self.app_label, perm_name))
def __iter__(self):
- # To fix 'item in perms.someapp' and __getitem__ iteraction we need to
+ # To fix 'item in perms.someapp' and __getitem__ interaction we need to
# define __iter__. See #18979 for details.
raise TypeError("PermLookupDict is not iterable.")
diff --git a/django/contrib/gis/db/backends/postgis/models.py b/django/contrib/gis/db/backends/postgis/models.py
index 83b254cb39..68d4c188d6 100644
--- a/django/contrib/gis/db/backends/postgis/models.py
+++ b/django/contrib/gis/db/backends/postgis/models.py
@@ -51,7 +51,7 @@ class PostGISGeometryColumns(models.Model):
class PostGISSpatialRefSys(models.Model, SpatialRefSysMixin):
"""
The 'spatial_ref_sys' table from PostGIS. See the PostGIS
- documentaiton at Ch. 4.2.1.
+ documentation at Ch. 4.2.1.
"""
srid = models.IntegerField(primary_key=True)
auth_name = models.CharField(max_length=256)
diff --git a/django/contrib/gis/db/models/query.py b/django/contrib/gis/db/models/query.py
index 343610c90c..c60750a5ba 100644
--- a/django/contrib/gis/db/models/query.py
+++ b/django/contrib/gis/db/models/query.py
@@ -500,7 +500,7 @@ class GeoQuerySet(QuerySet):
SQL function to call.
settings:
- Dictonary of internal settings to customize for the spatial procedure.
+ Dictionary of internal settings to customize for the spatial procedure.
Public Keyword Arguments:
diff --git a/django/contrib/gis/gdal/geomtype.py b/django/contrib/gis/gdal/geomtype.py
index abb184e2f9..d0dc1c0359 100644
--- a/django/contrib/gis/gdal/geomtype.py
+++ b/django/contrib/gis/gdal/geomtype.py
@@ -3,7 +3,7 @@ from django.utils import six
class OGRGeomType(object):
- "Encapulates OGR Geometry Types."
+ "Encapsulates OGR Geometry Types."
wkb25bit = -2147483648
diff --git a/django/contrib/gis/sitemaps/kml.py b/django/contrib/gis/sitemaps/kml.py
index 4dcaa8f595..83e1edcb61 100644
--- a/django/contrib/gis/sitemaps/kml.py
+++ b/django/contrib/gis/sitemaps/kml.py
@@ -44,7 +44,7 @@ class KMLSitemap(Sitemap):
def get_urls(self, page=1, site=None, protocol=None):
"""
- This method is overrridden so the appropriate `geo_format` attribute
+ This method is overridden so the appropriate `geo_format` attribute
is placed on each URL element.
"""
urls = Sitemap.get_urls(self, page=page, site=site, protocol=protocol)
diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py
index 83121a9066..931a9d87d7 100644
--- a/django/db/models/expressions.py
+++ b/django/db/models/expressions.py
@@ -302,7 +302,7 @@ class BaseExpression(object):
Does this expression contain a reference to some of the
existing aggregates? If so, returns the aggregate and also
the lookup parts that *weren't* found. So, if
- exsiting_aggregates = {'max_id': Max('id')}
+ existing_aggregates = {'max_id': Max('id')}
self.name = 'max_id'
queryset.filter(max_id__range=[10,100])
then this method will return Max('id') and those parts of the
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py
index 9324b7fb71..cd2457daf1 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -841,7 +841,7 @@ def default_if_none(value, arg):
@register.filter(is_safe=False)
def divisibleby(value, arg):
- """Returns True if the value is devisible by the argument."""
+ """Returns True if the value is divisible by the argument."""
return int(value) % int(arg) == 0
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index 09c0e72d3b..4526737ad3 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -824,7 +824,7 @@ def do_for(parser, token):
than -- the following::
<ul>
- {% if althete_list %}
+ {% if athlete_list %}
{% for athlete in athlete_list %}
<li>{{ athlete.name }}</li>
{% endfor %}
diff --git a/docs/_theme/djangodocs/static/djangodocs.css b/docs/_theme/djangodocs/static/djangodocs.css
index 9cf2384da0..a05f74782c 100644
--- a/docs/_theme/djangodocs/static/djangodocs.css
+++ b/docs/_theme/djangodocs/static/djangodocs.css
@@ -118,7 +118,7 @@ div.admonition-philosophy { padding-left:65px; background:url(docicons-philosoph
div.admonition-behind-the-scenes { padding-left:65px; background:url(docicons-behindscenes.png) .8em .8em no-repeat;}
.admonition.warning { background:url(docicons-warning.png) .8em .8em no-repeat; border:1px solid #ffc83c;}
-/*** versoinadded/changes ***/
+/*** versionadded/changes ***/
div.versionadded, div.versionchanged { }
div.versionadded span.title, div.versionchanged span.title, span.versionmodified { font-weight: bold; }
div.versionadded, div.versionchanged, div.deprecated { color:#555; }
diff --git a/docs/conf.py b/docs/conf.py
index 5a54997610..1176f8d206 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -6,7 +6,7 @@
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
-# that aren't pickleable (module imports are okay, they're removed automatically).
+# that aren't picklable (module imports are okay, they're removed automatically).
#
# All configuration values have a default; values that are commented out
# serve to show the default.
diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt
index 002cafec0b..bf1e3f67b3 100644
--- a/docs/ref/contrib/syndication.txt
+++ b/docs/ref/contrib/syndication.txt
@@ -823,7 +823,7 @@ This example illustrates all possible attributes and methods for a
def item_updateddate(self):
"""
- Returns the updateddated for every item in the feed.
+ Returns the updateddate for every item in the feed.
"""
item_updateddate = datetime.datetime(2005, 5, 3) # Hard-coded updateddate.
diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist
index 7ee0bd4c2c..c46d6d6e67 100644
--- a/docs/spelling_wordlist
+++ b/docs/spelling_wordlist
@@ -451,6 +451,7 @@ pgAdmin
phishing
php
pickleable
+picklable
picosecond
PIL
pingback
diff --git a/tests/admin_changelist/tests.py b/tests/admin_changelist/tests.py
index 8d5b966572..289cb0b497 100644
--- a/tests/admin_changelist/tests.py
+++ b/tests/admin_changelist/tests.py
@@ -682,7 +682,7 @@ class SeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
def test_add_row_selection(self):
"""
- Ensure that the status line for selected rows gets updated correcly (#22038)
+ Ensure that the status line for selected rows gets updated correctly (#22038)
"""
self.admin_login(username='super', password='secret')
self.selenium.get('%s%s' % (self.live_server_url,
diff --git a/tests/aggregation_regress/tests.py b/tests/aggregation_regress/tests.py
index 793775c41b..0674d997ad 100644
--- a/tests/aggregation_regress/tests.py
+++ b/tests/aggregation_regress/tests.py
@@ -1113,9 +1113,9 @@ class AggregationTests(TestCase):
in group by.
"""
qs = Book.objects.annotate(
- acount=Count('authors')
+ account=Count('authors')
).filter(
- acount=F('publisher__num_awards')
+ account=F('publisher__num_awards')
)
self.assertQuerysetEqual(
qs, ['Sams Teach Yourself Django in 24 Hours'],
diff --git a/tests/auth_tests/test_forms.py b/tests/auth_tests/test_forms.py
index 4453154363..9528b5792c 100644
--- a/tests/auth_tests/test_forms.py
+++ b/tests/auth_tests/test_forms.py
@@ -304,7 +304,7 @@ class UserChangeFormTest(TestCase):
# Just check we can create it
MyUserForm({})
- def test_unsuable_password(self):
+ def test_unusable_password(self):
user = User.objects.get(username='empty_password')
user.set_unusable_password()
user.save()
diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py
index 81d2925627..57733bcb62 100644
--- a/tests/auth_tests/test_views.py
+++ b/tests/auth_tests/test_views.py
@@ -504,7 +504,7 @@ class LoginTest(AuthViewsTestCase):
for bad_url in ('http://example.com',
'http:///example.com',
'https://example.com',
- 'ftp://exampel.com',
+ 'ftp://example.com',
'///example.com',
'//example.com',
'javascript:alert("XSS")'):
@@ -525,7 +525,7 @@ class LoginTest(AuthViewsTestCase):
# These URLs *should* still pass the security check
for good_url in ('/view/?param=http://example.com',
'/view/?param=https://example.com',
- '/view?param=ftp://exampel.com',
+ '/view?param=ftp://example.com',
'view/?param=//example.com',
'https://testserver/',
'HTTPS://testserver/',
@@ -782,7 +782,7 @@ class LogoutTest(AuthViewsTestCase):
for bad_url in ('http://example.com',
'http:///example.com',
'https://example.com',
- 'ftp://exampel.com',
+ 'ftp://example.com',
'///example.com',
'//example.com',
'javascript:alert("XSS")'):
@@ -801,7 +801,7 @@ class LogoutTest(AuthViewsTestCase):
# These URLs *should* still pass the security check
for good_url in ('/view/?param=http://example.com',
'/view/?param=https://example.com',
- '/view?param=ftp://exampel.com',
+ '/view?param=ftp://example.com',
'view/?param=//example.com',
'https://testserver/',
'HTTPS://testserver/',
@@ -947,6 +947,6 @@ class UUIDUserTests(TestCase):
})
self.assertRedirects(response, user_change_url)
row = LogEntry.objects.latest('id')
- self.assertEqual(row.user_id, 1) # harcoded in CustomUserAdmin.log_change()
+ self.assertEqual(row.user_id, 1) # hardcoded in CustomUserAdmin.log_change()
self.assertEqual(row.object_id, str(u.pk))
self.assertEqual(row.change_message, 'Changed password.')
diff --git a/tests/check_framework/test_security.py b/tests/check_framework/test_security.py
index c62d96f68c..f5976f34c6 100644
--- a/tests/check_framework/test_security.py
+++ b/tests/check_framework/test_security.py
@@ -224,7 +224,7 @@ class CheckStrictTransportSecurityTest(TestCase):
@override_settings(
MIDDLEWARE_CLASSES=[],
SECURE_HSTS_SECONDS=0)
- def test_no_sts_no_middlware(self):
+ def test_no_sts_no_middleware(self):
"""
Don't warn if SECURE_HSTS_SECONDS isn't > 0 and SecurityMiddleware isn't
installed.
@@ -258,7 +258,7 @@ class CheckStrictTransportSecuritySubdomainsTest(TestCase):
MIDDLEWARE_CLASSES=[],
SECURE_HSTS_INCLUDE_SUBDOMAINS=False,
SECURE_HSTS_SECONDS=3600)
- def test_no_sts_subdomains_no_middlware(self):
+ def test_no_sts_subdomains_no_middleware(self):
"""
Don't warn if SecurityMiddleware isn't installed.
"""
@@ -415,7 +415,7 @@ class CheckSSLRedirectTest(TestCase):
@override_settings(
MIDDLEWARE_CLASSES=[],
SECURE_SSL_REDIRECT=False)
- def test_no_ssl_redirect_no_middlware(self):
+ def test_no_ssl_redirect_no_middleware(self):
"""
Don't warn if SECURE_SSL_REDIRECT is False and SecurityMiddleware isn't
installed.
diff --git a/tests/expressions_case/tests.py b/tests/expressions_case/tests.py
index de1859b368..001e7f5c8d 100644
--- a/tests/expressions_case/tests.py
+++ b/tests/expressions_case/tests.py
@@ -1098,7 +1098,7 @@ class CaseExpressionTests(TestCase):
lambda x: (x, x.foo)
)
- def test_join_promotion_multiple_annonations(self):
+ def test_join_promotion_multiple_annotations(self):
o = CaseTestModel.objects.create(integer=1, integer2=1, string='1')
# Testing that:
# 1. There isn't any object on the remote side of the fk_rel
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py
index 778343cf40..7ab1f45da1 100644
--- a/tests/forms_tests/tests/test_forms.py
+++ b/tests/forms_tests/tests/test_forms.py
@@ -517,7 +517,7 @@ class FormsTestCase(TestCase):
self.assertHTMLEqual(str(f['when']), '<input type="text" name="when_0" value="1992-01-01" id="id_when_0" /><input type="text" name="when_1" value="01:01" id="id_when_1" />')
self.assertHTMLEqual(f['when'].as_hidden(), '<input type="hidden" name="when_0" value="1992-01-01" id="id_when_0" /><input type="hidden" name="when_1" value="01:01" id="id_when_1" />')
- def test_mulitple_choice_checkbox(self):
+ def test_multiple_choice_checkbox(self):
# MultipleChoiceField can also be used with the CheckboxSelectMultiple widget.
class SongForm(Form):
name = CharField()
diff --git a/tests/forms_tests/tests/tests.py b/tests/forms_tests/tests/tests.py
index 445f229e4a..8351bd84aa 100644
--- a/tests/forms_tests/tests/tests.py
+++ b/tests/forms_tests/tests/tests.py
@@ -173,7 +173,7 @@ class FormsModelTestCase(TestCase):
m.delete()
def test_boundary_conditions(self):
- # Boundary conditions on a PostitiveIntegerField #########################
+ # Boundary conditions on a PositiveIntegerField #########################
class BoundaryForm(ModelForm):
class Meta:
model = BoundaryModel
diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py
index c7bf63b4ca..dbe85bf3a8 100644
--- a/tests/httpwrappers/tests.py
+++ b/tests/httpwrappers/tests.py
@@ -309,7 +309,7 @@ class HttpResponseTests(unittest.TestCase):
h['Content-Disposition'] = 'attachment; filename="%s"' % f
# This one is triggering http://bugs.python.org/issue20747, that is Python
# will itself insert a newline in the header
- h['Content-Disposition'] = 'attachement; filename="EdelRot_Blu\u0308te (3)-0.JPG"'
+ h['Content-Disposition'] = 'attachment; filename="EdelRot_Blu\u0308te (3)-0.JPG"'
def test_newlines_in_headers(self):
# Bug #10188: Do not allow newlines in headers (CR or LF)
diff --git a/tests/i18n/commands/__init__.py b/tests/i18n/commands/__init__.py
index d26751895f..0b3acf5b4d 100644
--- a/tests/i18n/commands/__init__.py
+++ b/tests/i18n/commands/__init__.py
@@ -9,6 +9,6 @@ dummy2 = _("This is another translatable string.")
# This file has a literal with plural forms. When processed first, makemessages
# shouldn't create a .po file with duplicate `Plural-Forms` headers
number = 3
-dummuy3 = ungettext("%(number)s Foo", "%(number)s Foos", number) % {'number': number}
+dummy3 = ungettext("%(number)s Foo", "%(number)s Foos", number) % {'number': number}
dummy4 = _('Size')
diff --git a/tests/invalid_models_tests/test_models.py b/tests/invalid_models_tests/test_models.py
index 8417d5507e..833e0d97ea 100644
--- a/tests/invalid_models_tests/test_models.py
+++ b/tests/invalid_models_tests/test_models.py
@@ -345,7 +345,7 @@ class FieldNamesTests(IsolatedModelsTestCase):
]
# Second error because the FK specified in the `through` model
- # `m2msimple` has auto-genererated name longer than allowed.
+ # `m2msimple` has auto-generated name longer than allowed.
# There will be no check errors in the other M2M because it
# specifies db_column for the FK in `through` model even if the actual
# name is longer than the limits of the database.
diff --git a/tests/m2m_through/tests.py b/tests/m2m_through/tests.py
index f8149b7c1f..0d6609a6cd 100644
--- a/tests/m2m_through/tests.py
+++ b/tests/m2m_through/tests.py
@@ -346,7 +346,7 @@ class M2mThroughReferentialTests(TestCase):
[]
)
- def test_self_referential_non_symmentrical_first_side(self):
+ def test_self_referential_non_symmetrical_first_side(self):
tony = PersonSelfRefM2M.objects.create(name="Tony")
chris = PersonSelfRefM2M.objects.create(name="Chris")
Friendship.objects.create(
@@ -359,7 +359,7 @@ class M2mThroughReferentialTests(TestCase):
attrgetter("name")
)
- def test_self_referential_non_symmentrical_second_side(self):
+ def test_self_referential_non_symmetrical_second_side(self):
tony = PersonSelfRefM2M.objects.create(name="Tony")
chris = PersonSelfRefM2M.objects.create(name="Chris")
Friendship.objects.create(
@@ -371,7 +371,7 @@ class M2mThroughReferentialTests(TestCase):
[]
)
- def test_self_referential_non_symmentrical_clear_first_side(self):
+ def test_self_referential_non_symmetrical_clear_first_side(self):
tony = PersonSelfRefM2M.objects.create(name="Tony")
chris = PersonSelfRefM2M.objects.create(name="Chris")
Friendship.objects.create(
@@ -392,7 +392,7 @@ class M2mThroughReferentialTests(TestCase):
attrgetter("name")
)
- def test_self_referential_symmentrical(self):
+ def test_self_referential_symmetrical(self):
tony = PersonSelfRefM2M.objects.create(name="Tony")
chris = PersonSelfRefM2M.objects.create(name="Chris")
Friendship.objects.create(
diff --git a/tests/middleware/tests.py b/tests/middleware/tests.py
index 0aeb8c3283..366f1b14ba 100644
--- a/tests/middleware/tests.py
+++ b/tests/middleware/tests.py
@@ -163,7 +163,7 @@ class CommonMiddlewareTest(TestCase):
request.urlconf = 'middleware.extra_urls'
r = CommonMiddleware().process_request(request)
self.assertIsNotNone(r,
- "CommonMiddlware failed to return APPEND_SLASH redirect using request.urlconf")
+ "CommonMiddleware failed to return APPEND_SLASH redirect using request.urlconf")
self.assertEqual(r.status_code, 301)
self.assertEqual(r.url, 'http://testserver/customurlconf/slash/')
@@ -199,7 +199,7 @@ class CommonMiddlewareTest(TestCase):
request.urlconf = 'middleware.extra_urls'
r = CommonMiddleware().process_request(request)
self.assertIsNotNone(r,
- "CommonMiddlware failed to return APPEND_SLASH redirect using request.urlconf")
+ "CommonMiddleware failed to return APPEND_SLASH redirect using request.urlconf")
self.assertEqual(r.status_code, 301)
self.assertEqual(
r.url,
diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py
index f03e84c7ed..c2bcd02d4c 100644
--- a/tests/migrations/test_writer.py
+++ b/tests/migrations/test_writer.py
@@ -486,9 +486,9 @@ class WriterTests(TestCase):
# Yes, it doesn't make sense to use a class as a default for a
# CharField. It does make sense for custom fields though, for example
# an enumfield that takes the enum class as an argument.
- class DeconstructableInstances(object):
+ class DeconstructibleInstances(object):
def deconstruct(self):
- return ('DeconstructableInstances', [], {})
+ return ('DeconstructibleInstances', [], {})
- string = MigrationWriter.serialize(models.CharField(default=DeconstructableInstances))[0]
- self.assertEqual(string, "models.CharField(default=migrations.test_writer.DeconstructableInstances)")
+ string = MigrationWriter.serialize(models.CharField(default=DeconstructibleInstances))[0]
+ self.assertEqual(string, "models.CharField(default=migrations.test_writer.DeconstructibleInstances)")
diff --git a/tests/model_fields/models.py b/tests/model_fields/models.py
index 2141610b0e..ee8d4bdd90 100644
--- a/tests/model_fields/models.py
+++ b/tests/model_fields/models.py
@@ -248,7 +248,7 @@ if Image:
name = models.CharField(max_length=50)
mugshot = TestImageField(storage=temp_storage, upload_to='tests')
- class AbsctractPersonWithHeight(models.Model):
+ class AbstractPersonWithHeight(models.Model):
"""
Abstract model that defines an ImageField with only one dimension field
to make sure the dimension update is correctly run on concrete subclass
@@ -261,9 +261,9 @@ if Image:
class Meta:
abstract = True
- class PersonWithHeight(AbsctractPersonWithHeight):
+ class PersonWithHeight(AbstractPersonWithHeight):
"""
- Concrete model that subclass an abctract one with only on dimension
+ Concrete model that subclass an abstract one with only on dimension
field.
"""
name = models.CharField(max_length=50)
@@ -295,7 +295,7 @@ if Image:
Model that:
* Defines two ImageFields
* Defines the height/width fields before the ImageFields
- * Has a nullalble ImageField
+ * Has a nullable ImageField
"""
name = models.CharField(max_length=50)
mugshot_height = models.PositiveSmallIntegerField()
diff --git a/tests/model_options/test_default_related_name.py b/tests/model_options/test_default_related_name.py
index a30de192cb..940e1c3eb8 100644
--- a/tests/model_options/test_default_related_name.py
+++ b/tests/model_options/test_default_related_name.py
@@ -39,7 +39,7 @@ class DefaultRelatedNameTests(TestCase):
except AttributeError:
self.fail("Book should have a model_options_bookstores relation.")
- def test_inheritance_with_overrided_default_related_name(self):
+ def test_inheritance_with_overridden_default_related_name(self):
try:
self.book.editor_stores
except AttributeError:
diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py
index 6935a0eeda..13596b8b62 100644
--- a/tests/modeladmin/tests.py
+++ b/tests/modeladmin/tests.py
@@ -110,7 +110,7 @@ class ModelAdminTests(TestCase):
self.assertTrue(ma.lookup_allowed('name__nonexistent', 'test_value'))
def test_field_arguments(self):
- # If we specify the fields argument, fieldsets_add and fielsets_change should
+ # If we specify the fields argument, fieldsets_add and fieldsets_change should
# just stick the fields into a formsets structure and return it.
class BandAdmin(ModelAdmin):
fields = ['name']
diff --git a/tests/null_fk_ordering/models.py b/tests/null_fk_ordering/models.py
index dac1c4f6ae..b134e0991b 100644
--- a/tests/null_fk_ordering/models.py
+++ b/tests/null_fk_ordering/models.py
@@ -1,8 +1,8 @@
"""
Regression tests for proper working of ForeignKey(null=True). Tests these bugs:
- * #7512: including a nullable foreign key reference in Meta ordering has un
-xpected results
+ * #7512: including a nullable foreign key reference in Meta ordering has
+unexpected results
"""
from __future__ import unicode_literals
diff --git a/tests/proxy_models/tests.py b/tests/proxy_models/tests.py
index 2f423a9c34..89d122d4b6 100644
--- a/tests/proxy_models/tests.py
+++ b/tests/proxy_models/tests.py
@@ -29,7 +29,7 @@ class ProxyModelTests(TestCase):
DEFAULT_DB_ALIAS).as_sql()
self.assertEqual(my_person_sql, person_sql)
- def test_inheretance_new_table(self):
+ def test_inheritance_new_table(self):
"""
The StatusPerson models should have its own table (it's using ORM-level
inheritance).
diff --git a/tests/queries/models.py b/tests/queries/models.py
index 81f3b3f390..ad7743f0e8 100644
--- a/tests/queries/models.py
+++ b/tests/queries/models.py
@@ -56,7 +56,7 @@ class Note(models.Model):
def __init__(self, *args, **kwargs):
super(Note, self).__init__(*args, **kwargs)
# Regression for #13227 -- having an attribute that
- # is unpickleable doesn't stop you from cloning queries
+ # is unpicklable doesn't stop you from cloning queries
# that use objects of that type as an argument.
self.lock = threading.Lock()
diff --git a/tests/queries/tests.py b/tests/queries/tests.py
index deb195fe9c..5ebcc17df9 100644
--- a/tests/queries/tests.py
+++ b/tests/queries/tests.py
@@ -1854,7 +1854,7 @@ class Queries6Tests(TestCase):
def test_tickets_8921_9188(self):
# Incorrect SQL was being generated for certain types of exclude()
# queries that crossed multi-valued relations (#8921, #9188 and some
- # pre-emptively discovered cases).
+ # preemptively discovered cases).
self.assertQuerysetEqual(
PointerA.objects.filter(connection__pointerb__id=1),
@@ -3086,7 +3086,7 @@ class NullJoinPromotionOrTest(TestCase):
p1 = Program.objects.create(identifier=i1)
c1 = Channel.objects.create(identifier=i1)
p2 = Program.objects.create(identifier=i2)
- # Test OR + doubleneq. The expected result is that channel is LOUTER
+ # Test OR + doubleneg. The expected result is that channel is LOUTER
# joined, program INNER joined
qs1_filter = Identifier.objects.filter(
Q(program__id=p2.id, channel__id=c1.id)
@@ -3173,7 +3173,7 @@ class JoinReuseTest(TestCase):
class DisjunctionPromotionTests(TestCase):
- def test_disjuction_promotion_select_related(self):
+ def test_disjunction_promotion_select_related(self):
fk1 = FK1.objects.create(f1='f1', f2='f2')
basea = BaseA.objects.create(a=fk1)
qs = BaseA.objects.filter(Q(a=fk1) | Q(b=2))
diff --git a/tests/queryset_pickle/tests.py b/tests/queryset_pickle/tests.py
index 0cfa8aec8d..9883647ffd 100644
--- a/tests/queryset_pickle/tests.py
+++ b/tests/queryset_pickle/tests.py
@@ -59,7 +59,7 @@ class PickleabilityTestCase(TestCase):
def test_model_pickle(self):
"""
- Test that a model not defined on module level is pickleable.
+ Test that a model not defined on module level is picklable.
"""
original = Container.SomeModel(pk=1)
dumped = pickle.dumps(original)
diff --git a/tests/requests/tests.py b/tests/requests/tests.py
index 17dd770f0d..75118bb665 100644
--- a/tests/requests/tests.py
+++ b/tests/requests/tests.py
@@ -587,7 +587,7 @@ class HostValidationTests(SimpleTestCase):
'12.34.56.78:443',
'[2001:19f0:feee::dead:beef:cafe]',
'[2001:19f0:feee::dead:beef:cafe]:8080',
- 'xn--4ca9at.com', # Punnycode for öäü.com
+ 'xn--4ca9at.com', # Punycode for öäü.com
'anything.multitenant.com',
'multitenant.com',
'insensitive.com',
@@ -657,7 +657,7 @@ class HostValidationTests(SimpleTestCase):
'12.34.56.78:443',
'[2001:19f0:feee::dead:beef:cafe]',
'[2001:19f0:feee::dead:beef:cafe]:8080',
- 'xn--4ca9at.com', # Punnycode for öäü.com
+ 'xn--4ca9at.com', # Punycode for öäü.com
]
for host in legit_hosts:
@@ -703,7 +703,7 @@ class HostValidationTests(SimpleTestCase):
'example.com',
'12.34.56.78',
'[2001:19f0:feee::dead:beef:cafe]',
- 'xn--4ca9at.com', # Punnycode for öäü.com
+ 'xn--4ca9at.com', # Punycode for öäü.com
]:
request = HttpRequest()
request.META = {'HTTP_HOST': host}
diff --git a/tests/serializers_regress/tests.py b/tests/serializers_regress/tests.py
index 537965520b..d992f2cb46 100644
--- a/tests/serializers_regress/tests.py
+++ b/tests/serializers_regress/tests.py
@@ -313,7 +313,7 @@ The end."""),
(im2m_obj, 470, M2MIntermediateData, None),
- # testing post- and prereferences and extra fields
+ # testing post- and pre-references and extra fields
(im_obj, 480, Intermediate, {'right': 300, 'left': 470}),
(im_obj, 481, Intermediate, {'right': 300, 'left': 490}),
(im_obj, 482, Intermediate, {'right': 500, 'left': 470}),
diff --git a/tests/signals/tests.py b/tests/signals/tests.py
index 560fd6e8d3..dc1af6822f 100644
--- a/tests/signals/tests.py
+++ b/tests/signals/tests.py
@@ -168,7 +168,7 @@ class SignalTests(BaseSignalTest):
data.append(instance)
try:
- c1 = Car.objects.create(make="Volkswagon", model="Passat")
+ c1 = Car.objects.create(make="Volkswagen", model="Passat")
self.assertEqual(data, [c1, c1])
finally:
signals.pre_save.disconnect(decorated_handler)
diff --git a/tests/staticfiles_tests/test_liveserver.py b/tests/staticfiles_tests/test_liveserver.py
index b6dfc767e7..0175074971 100644
--- a/tests/staticfiles_tests/test_liveserver.py
+++ b/tests/staticfiles_tests/test_liveserver.py
@@ -1,5 +1,5 @@
"""
-A subset of the tests in tests/servers/tests exercicing
+A subset of the tests in tests/servers/tests exercising
django.contrib.staticfiles.testing.StaticLiveServerTestCase instead of
django.test.LiveServerTestCase.
"""
diff --git a/tests/template_tests/test_response.py b/tests/template_tests/test_response.py
index 69133b0708..0c3cc0cdd2 100644
--- a/tests/template_tests/test_response.py
+++ b/tests/template_tests/test_response.py
@@ -166,7 +166,7 @@ class SimpleTemplateResponseTest(SimpleTestCase):
def test_pickling(self):
# Create a template response. The context is
- # known to be unpickleable (e.g., a function).
+ # known to be unpicklable (e.g., a function).
response = SimpleTemplateResponse('first/test.html', {
'value': 123,
'fn': datetime.now,
@@ -289,7 +289,7 @@ class TemplateResponseTest(SimpleTestCase):
def test_pickling(self):
# Create a template response. The context is
- # known to be unpickleable (e.g., a function).
+ # known to be unpicklable (e.g., a function).
response = TemplateResponse(self.factory.get('/'),
'first/test.html', {
'value': 123,
diff --git a/tests/test_runner/test_discover_runner.py b/tests/test_runner/test_discover_runner.py
index 70117f0327..bb157b7f43 100644
--- a/tests/test_runner/test_discover_runner.py
+++ b/tests/test_runner/test_discover_runner.py
@@ -155,11 +155,11 @@ class DiscoverRunnerTest(TestCase):
self.assertIn('test_2', suite[8].id(),
msg="Methods of unittest cases should be reversed.")
- def test_overrideable_test_suite(self):
+ def test_overridable_test_suite(self):
self.assertEqual(DiscoverRunner().test_suite, TestSuite)
- def test_overrideable_test_runner(self):
+ def test_overridable_test_runner(self):
self.assertEqual(DiscoverRunner().test_runner, TextTestRunner)
- def test_overrideable_test_loader(self):
+ def test_overridable_test_loader(self):
self.assertEqual(DiscoverRunner().test_loader, defaultTestLoader)
diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py
index f8cb388360..b6e5dbc9b4 100644
--- a/tests/timezones/tests.py
+++ b/tests/timezones/tests.py
@@ -155,7 +155,7 @@ class LegacyDatabaseTests(TestCase):
self.assertEqual(event.dt.replace(tzinfo=ICT), dt)
@skipIfDBFeature('supports_timezones')
- def test_aware_datetime_unspported(self):
+ def test_aware_datetime_unsupported(self):
dt = datetime.datetime(2011, 9, 1, 13, 20, 30, tzinfo=EAT)
with self.assertRaises(ValueError):
Event.objects.create(dt=dt)
diff --git a/tests/unmanaged_models/models.py b/tests/unmanaged_models/models.py
index 61eb67a620..844512f51e 100644
--- a/tests/unmanaged_models/models.py
+++ b/tests/unmanaged_models/models.py
@@ -129,7 +129,7 @@ class Unmanaged1(models.Model):
db_table = "unmanaged_models_proxy1"
-# Unmanged with an m2m to unmanaged: the intermediary table won't be created.
+# Unmanaged with an m2m to unmanaged: the intermediary table won't be created.
class Unmanaged2(models.Model):
mm = models.ManyToManyField(Unmanaged1)
diff --git a/tests/utils_tests/files/strip_tags2.txt b/tests/utils_tests/files/strip_tags2.txt
index 331af904ea..6e458f7f91 100644
--- a/tests/utils_tests/files/strip_tags2.txt
+++ b/tests/utils_tests/files/strip_tags2.txt
@@ -29,7 +29,7 @@ Fragments
<center> ![image](http://iontech.files.wordpress.com/2013/01/androidfragmentation1-264x300.png) </center>
Fragments encompass both layout resource and Java source. Hence, unlike ``, they allow us to reuse the View components along with their functionality, if needed.
Fragments were first introduced in Honeycomb(API 11), living under the `android.app` package.
-**Note**: API 11 implies that Fragments have no support for devices less than Honeycomb and, for the record, as of writing this post, [more than 50% of Android devices worldwide run versions of Android below Honeycomb](http://developer.android.com/about/dashboards/index.html). Developer dissapointed? You don't have to be, cause google has been cautious enough to add the Fragment APIs to the support library. Yay!
+**Note**: API 11 implies that Fragments have no support for devices less than Honeycomb and, for the record, as of writing this post, [more than 50% of Android devices worldwide run versions of Android below Honeycomb](http://developer.android.com/about/dashboards/index.html). Developer disappointed? You don't have to be, cause google has been cautious enough to add the Fragment APIs to the support library. Yay!
In the support library Fragment APIs sit in the `android.support.v4.app` package. This post assumes that your `minSdk` support is below API 11. Hence we concentrate on the Fragment APIs of the support library.
diff --git a/tests/utils_tests/test_http.py b/tests/utils_tests/test_http.py
index 74c6905294..5679a576bd 100644
--- a/tests/utils_tests/test_http.py
+++ b/tests/utils_tests/test_http.py
@@ -100,7 +100,7 @@ class TestUtilsHttp(unittest.TestCase):
for bad_url in ('http://example.com',
'http:///example.com',
'https://example.com',
- 'ftp://exampel.com',
+ 'ftp://example.com',
r'\\example.com',
r'\\\example.com',
r'/\\/example.com',
@@ -121,7 +121,7 @@ class TestUtilsHttp(unittest.TestCase):
self.assertFalse(http.is_safe_url(bad_url, host='testserver'), "%s should be blocked" % bad_url)
for good_url in ('/view/?param=http://example.com',
'/view/?param=https://example.com',
- '/view?param=ftp://exampel.com',
+ '/view?param=ftp://example.com',
'view/?param=//example.com',
'https://testserver/',
'HTTPS://testserver/',