summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-04-26 10:18:45 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-04-26 10:18:45 -0700
commit2bcb8bfc8de5cd57ebb64b326cd7609aa0d8c1c7 (patch)
tree6c0dc4b5f0d4dbcae6c181efc2b346799ac5caf3 /tests
parent8b5b199e20ad2d8d3e91873ce0cd5d3035e05ece (diff)
Fix many many typos in comments throughout the codebase
Diffstat (limited to 'tests')
-rw-r--r--tests/admin_checks/tests.py2
-rw-r--r--tests/admin_inlines/tests.py2
-rw-r--r--tests/admin_scripts/tests.py2
-rw-r--r--tests/admin_validation/tests.py4
-rw-r--r--tests/admin_views/admin.py2
-rw-r--r--tests/admin_views/tests.py6
-rw-r--r--tests/datatypes/tests.py2
-rw-r--r--tests/field_deconstruction/tests.py2
-rw-r--r--tests/file_uploads/tests.py4
-rw-r--r--tests/model_fields/models.py2
-rw-r--r--tests/model_forms/tests.py2
-rw-r--r--tests/model_inheritance_regress/tests.py6
-rw-r--r--tests/queries/tests.py2
-rw-r--r--tests/schema/tests.py2
-rw-r--r--tests/syndication_tests/tests.py2
-rw-r--r--tests/template_tests/test_response.py4
-rw-r--r--tests/template_tests/tests.py2
-rw-r--r--tests/validators/tests.py2
18 files changed, 25 insertions, 25 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py
index 5008555556..81f14afedd 100644
--- a/tests/admin_checks/tests.py
+++ b/tests/admin_checks/tests.py
@@ -409,7 +409,7 @@ class SystemChecksTestCase(TestCase):
def test_nonexistant_field(self):
class SongAdmin(admin.ModelAdmin):
- readonly_fields = ("title", "nonexistant")
+ readonly_fields = ("title", "nonexistent")
errors = SongAdmin.check(model=Song)
expected = [
diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py
index 4b654c9f95..ff34180a5b 100644
--- a/tests/admin_inlines/tests.py
+++ b/tests/admin_inlines/tests.py
@@ -385,7 +385,7 @@ class TestInlinePermissions(TestCase):
author = Author.objects.create(pk=1, name='The Author')
book = author.books.create(name='The inline Book')
self.author_change_url = '/admin/admin_inlines/author/%i/' % author.id
- # Get the ID of the automatically created intermediate model for thw Author-Book m2m
+ # Get the ID of the automatically created intermediate model for the Author-Book m2m
author_book_auto_m2m_intermediate = Author.books.through.objects.get(author=author, book=book)
self.author_book_auto_m2m_intermediate_id = author_book_auto_m2m_intermediate.pk
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 43a1227ad8..4c3ee36b66 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -1564,7 +1564,7 @@ class Discovery(TestCase):
def test_precedence(self):
"""
- Apps listed first in INSTALLED_APPS have precendence.
+ Apps listed first in INSTALLED_APPS have precedence.
"""
with self.settings(INSTALLED_APPS=['admin_scripts.complex_app',
'admin_scripts.simple_app',
diff --git a/tests/admin_validation/tests.py b/tests/admin_validation/tests.py
index 582f598d27..a7c32ca79f 100644
--- a/tests/admin_validation/tests.py
+++ b/tests/admin_validation/tests.py
@@ -214,10 +214,10 @@ class ValidationTestCase(TestCase):
def test_nonexistant_field(self):
class SongAdmin(admin.ModelAdmin):
- readonly_fields = ("title", "nonexistant")
+ readonly_fields = ("title", "nonexistent")
self.assertRaisesMessage(ImproperlyConfigured,
- str_prefix("SongAdmin.readonly_fields[1], %(_)s'nonexistant' is not a callable "
+ str_prefix("SongAdmin.readonly_fields[1], %(_)s'nonexistent' is not a callable "
"or an attribute of 'SongAdmin' or found in the model 'Song'."),
SongAdmin.validate,
Song)
diff --git a/tests/admin_views/admin.py b/tests/admin_views/admin.py
index ba523265c2..a5b3df3b9e 100644
--- a/tests/admin_views/admin.py
+++ b/tests/admin_views/admin.py
@@ -420,7 +420,7 @@ class PostAdmin(admin.ModelAdmin):
if instance.pk:
return "%d amount of cool." % instance.pk
else:
- return "Unkown coolness."
+ return "Unknown coolness."
def value(self, instance):
return 1000
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 60220bb0f0..384d31c2a3 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -1045,8 +1045,8 @@ class AdminViewPermissionsTest(TestCase):
"""
Make sure only staff members can log in.
- Successful posts to the login page will redirect to the orignal url.
- Unsuccessfull attempts will continue to render the login page with
+ Successful posts to the login page will redirect to the original url.
+ Unsuccessful attempts will continue to render the login page with
a 200 status code.
"""
login_url = reverse('admin:login') + '?next=/test_admin/admin/'
@@ -3649,7 +3649,7 @@ class ReadonlyTest(TestCase):
self.assertContains(response,
"<label>Awesomeness level:</label>")
self.assertContains(response, "Very awesome.")
- self.assertContains(response, "Unkown coolness.")
+ self.assertContains(response, "Unknown coolness.")
self.assertContains(response, "foo")
# Checks that multiline text in a readonly field gets <br /> tags
diff --git a/tests/datatypes/tests.py b/tests/datatypes/tests.py
index 9cc88e9a66..e55405983d 100644
--- a/tests/datatypes/tests.py
+++ b/tests/datatypes/tests.py
@@ -91,6 +91,6 @@ class DataTypesTestCase(TestCase):
b = RumBaba.objects.create()
# Verify we didn't break DateTimeField behavior
self.assertIsInstance(b.baked_timestamp, datetime.datetime)
- # We need to test this this way because datetime.datetime inherits
+ # We need to test this way because datetime.datetime inherits
# from datetime.date:
self.assertIsInstance(b.baked_date, datetime.date) and not isinstance(b.baked_date, datetime.datetime)
diff --git a/tests/field_deconstruction/tests.py b/tests/field_deconstruction/tests.py
index 8b5bbdf0c9..10cf342529 100644
--- a/tests/field_deconstruction/tests.py
+++ b/tests/field_deconstruction/tests.py
@@ -112,7 +112,7 @@ class FieldDeconstructionTests(TestCase):
def test_decimal_field_0_decimal_places(self):
"""
- A DecimalField with decimal_places=0 shoudl work (#22272).
+ A DecimalField with decimal_places=0 should work (#22272).
"""
field = models.DecimalField(max_digits=5, decimal_places=0)
name, path, args, kwargs = field.deconstruct()
diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py
index 35adb7c1ab..0e574cbc56 100644
--- a/tests/file_uploads/tests.py
+++ b/tests/file_uploads/tests.py
@@ -162,9 +162,9 @@ class FileUploadTests(TestCase):
response = self.client.request(**r)
# The filenames should have been sanitized by the time it got to the view.
- recieved = json.loads(response.content.decode('utf-8'))
+ received = json.loads(response.content.decode('utf-8'))
for i, name in enumerate(scary_file_names):
- got = recieved["file%s" % i]
+ got = received["file%s" % i]
self.assertEqual(got, "hax0rd.txt")
def test_filename_overflow(self):
diff --git a/tests/model_fields/models.py b/tests/model_fields/models.py
index 16bfd61308..8a6e9c83b1 100644
--- a/tests/model_fields/models.py
+++ b/tests/model_fields/models.py
@@ -101,7 +101,7 @@ class PrimaryKeyCharModel(models.Model):
class FksToBooleans(models.Model):
- """Model wih FKs to models with {Null,}BooleanField's, #15040"""
+ """Model with FKs to models with {Null,}BooleanField's, #15040"""
bf = models.ForeignKey(BooleanModel)
nbf = models.ForeignKey(NullBooleanModel)
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py
index 12dbf06d0d..20bdc2b79e 100644
--- a/tests/model_forms/tests.py
+++ b/tests/model_forms/tests.py
@@ -1844,7 +1844,7 @@ class FileAndImageFieldTests(TestCase):
@skipUnless(test_images, "Pillow not installed")
def test_image_field(self):
- # ImageField and FileField are nearly identical, but they differ slighty when
+ # ImageField and FileField are nearly identical, but they differ slightly when
# it comes to validation. This specifically tests that #6302 is fixed for
# both file fields and image fields.
diff --git a/tests/model_inheritance_regress/tests.py b/tests/model_inheritance_regress/tests.py
index 5297898e2f..745a63f7e6 100644
--- a/tests/model_inheritance_regress/tests.py
+++ b/tests/model_inheritance_regress/tests.py
@@ -258,7 +258,7 @@ class ModelInheritanceTest(TestCase):
self.assertEqual(m2mchildren, [])
# Ordering should not include any database column more than once (this
- # is most likely to ocurr naturally with model inheritance, so we
+ # is most likely to occur naturally with model inheritance, so we
# check it here). Regression test for #9390. This necessarily pokes at
# the SQL string for the query, since the duplicate problems are only
# apparent at that late stage.
@@ -363,10 +363,10 @@ class ModelInheritanceTest(TestCase):
self.assertEqual(parties, [bachelor])
# Check that a subclass of a subclass of an abstract model doesn't get
- # it's own accessor.
+ # its own accessor.
self.assertFalse(hasattr(p2, 'messybachelorparty_set'))
- # ... but it does inherit the m2m from it's parent
+ # ... but it does inherit the m2m from its parent
messy = MessyBachelorParty.objects.create(
name='Bachelor party for Dave')
messy.attendees = [p4]
diff --git a/tests/queries/tests.py b/tests/queries/tests.py
index 5cd2b27dfa..6d8996c1d8 100644
--- a/tests/queries/tests.py
+++ b/tests/queries/tests.py
@@ -2009,7 +2009,7 @@ class CloneTests(TestCase):
n_list = Note.objects.all()
# Evaluate the Note queryset, populating the query cache
list(n_list)
- # Use the note queryset in a query, and evalute
+ # Use the note queryset in a query, and evaluate
# that query in a way that involves cloning.
self.assertEqual(ExtraInfo.objects.filter(note__in=n_list)[0].info, 'good')
diff --git a/tests/schema/tests.py b/tests/schema/tests.py
index 57c344ce8d..0ab5bb0363 100644
--- a/tests/schema/tests.py
+++ b/tests/schema/tests.py
@@ -527,7 +527,7 @@ class SchemaTests(TransactionTestCase):
UniqueTest.objects.create(year=2011, slug="bar")
self.assertRaises(IntegrityError, UniqueTest.objects.create, year=2012, slug="foo")
UniqueTest.objects.all().delete()
- # Alter the model to it's non-unique-together companion
+ # Alter the model to its non-unique-together companion
with connection.schema_editor() as editor:
editor.alter_unique_together(
UniqueTest,
diff --git a/tests/syndication_tests/tests.py b/tests/syndication_tests/tests.py
index ce70b038cd..facb413c7f 100644
--- a/tests/syndication_tests/tests.py
+++ b/tests/syndication_tests/tests.py
@@ -317,7 +317,7 @@ class SyndicationFeedTest(FeedTestCase):
Test that datetimes are correctly converted to the local time zone.
"""
# Naive date times passed in get converted to the local time zone, so
- # check the recived zone offset against the local offset.
+ # check the received zone offset against the local offset.
response = self.client.get('/syndication/naive-dates/')
doc = minidom.parseString(response.content)
updated = doc.getElementsByTagName('updated')[0].firstChild.wholeText
diff --git a/tests/template_tests/test_response.py b/tests/template_tests/test_response.py
index ce2cc4a2c8..8791a11353 100644
--- a/tests/template_tests/test_response.py
+++ b/tests/template_tests/test_response.py
@@ -167,7 +167,7 @@ class SimpleTemplateResponseTest(TestCase):
self.assertEqual(unpickled_response['content-type'], response['content-type'])
self.assertEqual(unpickled_response.status_code, response.status_code)
- # ...and the unpickled reponse doesn't have the
+ # ...and the unpickled response doesn't have the
# template-related attributes, so it can't be re-rendered
template_attrs = ('template_name', 'context_data', '_post_render_callbacks')
for attr in template_attrs:
@@ -273,7 +273,7 @@ class TemplateResponseTest(TestCase):
self.assertEqual(unpickled_response['content-type'], response['content-type'])
self.assertEqual(unpickled_response.status_code, response.status_code)
- # ...and the unpickled reponse doesn't have the
+ # ...and the unpickled response doesn't have the
# template-related attributes, so it can't be re-rendered
template_attrs = ('template_name', 'context_data',
'_post_render_callbacks', '_request', '_current_app')
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index 17030c7560..90279265ad 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -717,7 +717,7 @@ class TemplateTests(TestCase):
'basic-syntax27': (r'{{ _("\"fred\"") }}', {}, "\"fred\""),
# regression test for ticket #12554
- # make sure a silent_variable_failure Exception is supressed
+ # make sure a silent_variable_failure Exception is suppressed
# on dictionary and attribute lookup
'basic-syntax28': ("{{ a.b }}", {'a': SilentGetItemClass()}, ('', 'INVALID')),
'basic-syntax29': ("{{ a.b }}", {'a': SilentAttrClass()}, ('', 'INVALID')),
diff --git a/tests/validators/tests.py b/tests/validators/tests.py
index 25f1e1b2f2..928c482107 100644
--- a/tests/validators/tests.py
+++ b/tests/validators/tests.py
@@ -88,7 +88,7 @@ TEST_DATA = (
(validate_ipv4_address, '25.1 .1.1', ValidationError),
# validate_ipv6_address uses django.utils.ipv6, which
- # is tested in much greater detail in it's own testcase
+ # is tested in much greater detail in its own testcase
(validate_ipv6_address, 'fe80::1', None),
(validate_ipv6_address, '::1', None),
(validate_ipv6_address, '1:2:3:4:5:6:7:8', None),