summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorДилян Палаузов <dilyanpalauzov@users.noreply.github.com>2017-11-06 22:11:39 -0500
committerTim Graham <timograham@gmail.com>2017-11-06 22:41:23 -0500
commite68baf386219ab64539ba5cef628811be03fdb84 (patch)
treec91ea8f0b79ba3a9edc66db32c3ed18ea6ebf837 /tests
parentbcaef2c91d234fe742973eb7df8a47f2048d3e63 (diff)
[2.0.x] Fixed #28776 -- Fixed a/an/and typos in docs and comments.
Backport of 6c0042430e3618ce5c276d195d92a6b884daa3a3 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/admin_checks/tests.py2
-rw-r--r--tests/auth_tests/test_checks.py4
-rw-r--r--tests/files/tests.py2
-rw-r--r--tests/m2m_through_regress/models.py2
-rw-r--r--tests/managers_regress/tests.py2
-rw-r--r--tests/many_to_one/tests.py6
-rw-r--r--tests/migrations/test_autodetector.py2
-rw-r--r--tests/migrations/test_commands.py2
-rw-r--r--tests/model_regress/tests.py2
-rw-r--r--tests/proxy_models/models.py2
-rw-r--r--tests/requests/tests.py2
-rw-r--r--tests/staticfiles_tests/project/documents/cached/css/fonts/font.eot2
-rw-r--r--tests/staticfiles_tests/test_storage.py4
13 files changed, 17 insertions, 17 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py
index eb394f794f..f4fabef301 100644
--- a/tests/admin_checks/tests.py
+++ b/tests/admin_checks/tests.py
@@ -354,7 +354,7 @@ class SystemChecksTestCase(SimpleTestCase):
def test_generic_inline_model_admin_non_generic_model(self):
"""
A model without a GenericForeignKey raises problems if it's included
- in an GenericInlineModelAdmin definition.
+ in a GenericInlineModelAdmin definition.
"""
class BookInline(GenericStackedInline):
model = Book
diff --git a/tests/auth_tests/test_checks.py b/tests/auth_tests/test_checks.py
index 3f86e7a80e..8c3e323efa 100644
--- a/tests/auth_tests/test_checks.py
+++ b/tests/auth_tests/test_checks.py
@@ -57,8 +57,8 @@ class UserModelChecksTests(SimpleTestCase):
@override_settings(AUTH_USER_MODEL='auth_tests.CustomUserNonUniqueUsername')
def test_username_non_unique(self):
"""
- A non-unique USERNAME_FIELD should raise an error only if we use the
- default authentication backend. Otherwise, an warning should be raised.
+ A non-unique USERNAME_FIELD raises an error only if the default
+ authentication backend is used. Otherwise, a warning is raised.
"""
errors = checks.run_checks()
self.assertEqual(errors, [
diff --git a/tests/files/tests.py b/tests/files/tests.py
index a414a81ad3..3999794154 100644
--- a/tests/files/tests.py
+++ b/tests/files/tests.py
@@ -244,7 +244,7 @@ class DimensionClosingBug(unittest.TestCase):
"""
# We need to inject a modified open() builtin into the images module
# that checks if the file was closed properly if the function is
- # called with a filename instead of an file object.
+ # called with a filename instead of a file object.
# get_image_dimensions will call our catching_open instead of the
# regular builtin one.
diff --git a/tests/m2m_through_regress/models.py b/tests/m2m_through_regress/models.py
index 1214c93ea1..391ddc69c0 100644
--- a/tests/m2m_through_regress/models.py
+++ b/tests/m2m_through_regress/models.py
@@ -40,7 +40,7 @@ class Group(models.Model):
return self.name
-# A set of models that use an non-abstract inherited model as the 'through' model.
+# A set of models that use a non-abstract inherited model as the 'through' model.
class A(models.Model):
a_text = models.CharField(max_length=20)
diff --git a/tests/managers_regress/tests.py b/tests/managers_regress/tests.py
index a05a24e597..dd33fdf96f 100644
--- a/tests/managers_regress/tests.py
+++ b/tests/managers_regress/tests.py
@@ -65,7 +65,7 @@ class ManagersRegressionTests(TestCase):
AbstractBase3.objects.all()
def test_custom_abstract_manager(self):
- # Accessing the manager on an abstract model with an custom
+ # Accessing the manager on an abstract model with a custom
# manager should raise an attribute error with an appropriate
# message.
msg = "Manager isn't available; AbstractBase2 is abstract"
diff --git a/tests/many_to_one/tests.py b/tests/many_to_one/tests.py
index 5052c6d471..0e3395bf3a 100644
--- a/tests/many_to_one/tests.py
+++ b/tests/many_to_one/tests.py
@@ -570,12 +570,12 @@ class ManyToOneTests(TestCase):
Third.objects.create(name='Third 1')
Third.objects.create(name='Third 2')
th = Third(name="testing")
- # The object isn't saved an thus the relation field is null - we won't even
+ # The object isn't saved and thus the relation field is null - we won't even
# execute a query in this case.
with self.assertNumQueries(0):
self.assertEqual(th.child_set.count(), 0)
th.save()
- # Now the model is saved, so we will need to execute an query.
+ # Now the model is saved, so we will need to execute a query.
with self.assertNumQueries(1):
self.assertEqual(th.child_set.count(), 0)
@@ -591,7 +591,7 @@ class ManyToOneTests(TestCase):
self.assertEqual(public_student.school, public_school)
- # Make sure the base manager is used so that an student can still access
+ # Make sure the base manager is used so that a student can still access
# its related school even if the default manager doesn't normally
# allow it.
self.assertEqual(private_student.school, private_school)
diff --git a/tests/migrations/test_autodetector.py b/tests/migrations/test_autodetector.py
index 74961048fb..95aeec57aa 100644
--- a/tests/migrations/test_autodetector.py
+++ b/tests/migrations/test_autodetector.py
@@ -1146,7 +1146,7 @@ class AutodetectorTests(TestCase):
# a CreateModel operation w/o any definition on the original model
model_state_not_specified = ModelState("a", "model", [("id", models.AutoField(primary_key=True))])
# Explicitly testing for None, since this was the issue in #23452 after
- # a AlterFooTogether operation with e.g. () as value
+ # an AlterFooTogether operation with e.g. () as value
model_state_none = ModelState("a", "model", [
("id", models.AutoField(primary_key=True))
], {
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index e6aaa8fc90..8caa0b5deb 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -155,7 +155,7 @@ class MigrateTests(MigrationTestBase):
# Fails because "migrations_tribble" does not exist but needs to in
# order to make --fake-initial work.
call_command("migrate", "migrations", fake_initial=True, verbosity=0)
- # Fake a apply
+ # Fake an apply
call_command("migrate", "migrations", fake=True, verbosity=0)
call_command("migrate", "migrations", fake=True, verbosity=0, database="other")
# Unmigrate everything
diff --git a/tests/model_regress/tests.py b/tests/model_regress/tests.py
index cb0b530063..e3977ee316 100644
--- a/tests/model_regress/tests.py
+++ b/tests/model_regress/tests.py
@@ -188,7 +188,7 @@ class ModelTests(TestCase):
@skipUnlessDBFeature("supports_timezones")
def test_timezones(self):
- # Saving an updating with timezone-aware datetime Python objects.
+ # Saving and updating with timezone-aware datetime Python objects.
# Regression test for #10443.
# The idea is that all these creations and saving should work without
# crashing. It's not rocket science.
diff --git a/tests/proxy_models/models.py b/tests/proxy_models/models.py
index d0603886e0..5e6fdd2b93 100644
--- a/tests/proxy_models/models.py
+++ b/tests/proxy_models/models.py
@@ -69,7 +69,7 @@ class ManagerMixin(models.Model):
class OtherPerson(Person, ManagerMixin):
"""
- A class with the default manager from Person, plus an secondary manager.
+ A class with the default manager from Person, plus a secondary manager.
"""
class Meta:
proxy = True
diff --git a/tests/requests/tests.py b/tests/requests/tests.py
index a3eb9632a3..bc99818797 100644
--- a/tests/requests/tests.py
+++ b/tests/requests/tests.py
@@ -235,7 +235,7 @@ class RequestsTests(SimpleTestCase):
self.assertEqual(response.cookies['c']['expires'], '')
def test_far_expiration(self):
- "Cookie will expire when an distant expiration time is provided"
+ "Cookie will expire when a distant expiration time is provided"
response = HttpResponse()
response.set_cookie('datetime', expires=datetime(2028, 1, 1, 4, 5, 6))
datetime_cookie = response.cookies['datetime']
diff --git a/tests/staticfiles_tests/project/documents/cached/css/fonts/font.eot b/tests/staticfiles_tests/project/documents/cached/css/fonts/font.eot
index 7c58b2e622..fdd7138c52 100644
--- a/tests/staticfiles_tests/project/documents/cached/css/fonts/font.eot
+++ b/tests/staticfiles_tests/project/documents/cached/css/fonts/font.eot
@@ -1 +1 @@
-not really a EOT ;) \ No newline at end of file
+not really an EOT ;) \ No newline at end of file
diff --git a/tests/staticfiles_tests/test_storage.py b/tests/staticfiles_tests/test_storage.py
index 12d4c85c01..318da6a226 100644
--- a/tests/staticfiles_tests/test_storage.py
+++ b/tests/staticfiles_tests/test_storage.py
@@ -96,10 +96,10 @@ class TestHashedFiles:
def test_path_with_querystring_and_fragment(self):
relpath = self.hashed_file_path("cached/css/fragments.css")
- self.assertEqual(relpath, "cached/css/fragments.c4e6753b52d3.css")
+ self.assertEqual(relpath, "cached/css/fragments.a60c0e74834f.css")
with storage.staticfiles_storage.open(relpath) as relfile:
content = relfile.read()
- self.assertIn(b'fonts/font.a4b0478549d0.eot?#iefix', content)
+ self.assertIn(b'fonts/font.b9b105392eb8.eot?#iefix', content)
self.assertIn(b'fonts/font.b8d603e42714.svg#webfontIyfZbseF', content)
self.assertIn(b'fonts/font.b8d603e42714.svg#path/to/../../fonts/font.svg', content)
self.assertIn(b'data:font/woff;charset=utf-8;base64,d09GRgABAAAAADJoAA0AAAAAR2QAAQAAAAAAAAAAAAA', content)