summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2011-12-17 17:37:24 +0000
committerAdrian Holovaty <adrian@holovaty.com>2011-12-17 17:37:24 +0000
commit20c8aa2a2029be50449b25122f85bbef0f2b957f (patch)
tree1bc5e31d0350c2f6646136fc4859b885a1e2359b /tests
parentc7534584e8cbb33203675f92e71ec76fb5afd95c (diff)
Fixed various dodgy behaviours
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/force_insert_update/models.py2
-rw-r--r--tests/modeltests/prefetch_related/tests.py2
-rw-r--r--tests/regressiontests/defer_regress/tests.py2
-rw-r--r--tests/regressiontests/fixtures_regress/models.py2
-rw-r--r--tests/regressiontests/mail/tests.py4
-rw-r--r--tests/regressiontests/model_inheritance_regress/tests.py4
-rw-r--r--tests/regressiontests/multiple_database/tests.py6
-rw-r--r--tests/regressiontests/queries/tests.py2
-rw-r--r--tests/regressiontests/serializers_regress/tests.py2
-rw-r--r--tests/regressiontests/templates/filters.py2
-rw-r--r--tests/regressiontests/test_client_regress/models.py4
11 files changed, 16 insertions, 16 deletions
diff --git a/tests/modeltests/force_insert_update/models.py b/tests/modeltests/force_insert_update/models.py
index c356312606..56d6624e0d 100644
--- a/tests/modeltests/force_insert_update/models.py
+++ b/tests/modeltests/force_insert_update/models.py
@@ -1,6 +1,6 @@
"""
Tests for forcing insert and update queries (instead of Django's normal
-automatic behaviour).
+automatic behavior).
"""
from django.db import models
diff --git a/tests/modeltests/prefetch_related/tests.py b/tests/modeltests/prefetch_related/tests.py
index 5ecf6f4ad6..4c51a83bd9 100644
--- a/tests/modeltests/prefetch_related/tests.py
+++ b/tests/modeltests/prefetch_related/tests.py
@@ -149,7 +149,7 @@ class PrefetchRelatedTests(TestCase):
def test_get(self):
"""
- Test that objects retrieved with .get() get the prefetch behaviour
+ Test that objects retrieved with .get() get the prefetch behavior.
"""
# Need a double
with self.assertNumQueries(3):
diff --git a/tests/regressiontests/defer_regress/tests.py b/tests/regressiontests/defer_regress/tests.py
index cbf4521b75..4afe39bee2 100644
--- a/tests/regressiontests/defer_regress/tests.py
+++ b/tests/regressiontests/defer_regress/tests.py
@@ -47,7 +47,7 @@ class DeferRegressionTest(TestCase):
self.assertEqual(r.item, i)
# Some further checks for select_related() and inherited model
- # behaviour (regression for #10710).
+ # behavior (regression for #10710).
c1 = Child.objects.create(name="c1", value=42)
c2 = Child.objects.create(name="c2", value=37)
Leaf.objects.create(name="l1", child=c1, second_child=c2)
diff --git a/tests/regressiontests/fixtures_regress/models.py b/tests/regressiontests/fixtures_regress/models.py
index b956742969..5a16f175a1 100644
--- a/tests/regressiontests/fixtures_regress/models.py
+++ b/tests/regressiontests/fixtures_regress/models.py
@@ -113,7 +113,7 @@ class Person(models.Model):
return self.name
# Person doesn't actually have a dependency on store, but we need to define
- # one to test the behaviour of the dependency resolution algorithm.
+ # one to test the behavior of the dependency resolution algorithm.
def natural_key(self):
return (self.name,)
natural_key.dependencies = ['fixtures_regress.store']
diff --git a/tests/regressiontests/mail/tests.py b/tests/regressiontests/mail/tests.py
index 08eb7b9f45..ac97f1573a 100644
--- a/tests/regressiontests/mail/tests.py
+++ b/tests/regressiontests/mail/tests.py
@@ -75,9 +75,9 @@ class MailTests(TestCase):
"""
Test for space continuation character in long (ascii) subject headers (#7747)
"""
- email = EmailMessage('Long subject lines that get wrapped should use a space continuation character to get expected behaviour in Outlook and Thunderbird', 'Content', 'from@example.com', ['to@example.com'])
+ email = EmailMessage('Long subject lines that get wrapped should use a space continuation character to get expected behavior in Outlook and Thunderbird', 'Content', 'from@example.com', ['to@example.com'])
message = email.message()
- self.assertEqual(message['Subject'], 'Long subject lines that get wrapped should use a space continuation\n character to get expected behaviour in Outlook and Thunderbird')
+ self.assertEqual(message['Subject'], 'Long subject lines that get wrapped should use a space continuation\n character to get expected behavior in Outlook and Thunderbird')
def test_message_header_overrides(self):
"""
diff --git a/tests/regressiontests/model_inheritance_regress/tests.py b/tests/regressiontests/model_inheritance_regress/tests.py
index 99f7f1d377..8e2c56bd55 100644
--- a/tests/regressiontests/model_inheritance_regress/tests.py
+++ b/tests/regressiontests/model_inheritance_regress/tests.py
@@ -1,5 +1,5 @@
"""
-Regression tests for Model inheritance behaviour.
+Regression tests for Model inheritance behavior.
"""
from __future__ import absolute_import
@@ -21,7 +21,7 @@ class ModelInheritanceTest(TestCase):
# Regression for #7350, #7202
# Check that when you create a Parent object with a specific reference
# to an existent child instance, saving the Parent doesn't duplicate
- # the child. This behaviour is only activated during a raw save - it
+ # the child. This behavior is only activated during a raw save - it
# is mostly relevant to deserialization, but any sort of CORBA style
# 'narrow()' API would require a similar approach.
diff --git a/tests/regressiontests/multiple_database/tests.py b/tests/regressiontests/multiple_database/tests.py
index d5bf8479bb..e2f433ece1 100644
--- a/tests/regressiontests/multiple_database/tests.py
+++ b/tests/regressiontests/multiple_database/tests.py
@@ -934,7 +934,7 @@ class QueryTestCase(TestCase):
extra_arg=True)
class TestRouter(object):
- # A test router. The behaviour is vaguely master/slave, but the
+ # A test router. The behavior is vaguely master/slave, but the
# databases aren't assumed to propagate changes.
def db_for_read(self, model, instance=None, **hints):
if instance:
@@ -1010,7 +1010,7 @@ class RouterTestCase(TestCase):
self.assertEqual(Book.objects.db_manager('default').all().db, 'default')
def test_syncdb_selection(self):
- "Synchronization behaviour is predicatable"
+ "Synchronization behavior is predictable"
self.assertTrue(router.allow_syncdb('default', User))
self.assertTrue(router.allow_syncdb('default', Book))
@@ -1042,7 +1042,7 @@ class RouterTestCase(TestCase):
dive = Book.objects.using('other').create(title="Dive into Python",
published=datetime.date(2009, 5, 4))
- # First check the baseline behaviour
+ # First check the baseline behavior.
self.assertEqual(router.db_for_read(User), 'other')
self.assertEqual(router.db_for_read(Book), 'other')
diff --git a/tests/regressiontests/queries/tests.py b/tests/regressiontests/queries/tests.py
index 6a54125326..b89bc4e725 100644
--- a/tests/regressiontests/queries/tests.py
+++ b/tests/regressiontests/queries/tests.py
@@ -1354,7 +1354,7 @@ class Queries6Tests(TestCase):
ann1.notes.add(n1)
ann2 = Annotation.objects.create(name='a2', tag=t4)
- # This next test used to cause really weird PostgreSQL behaviour, but it was
+ # This next test used to cause really weird PostgreSQL behavior, but it was
# only apparent much later when the full test suite ran.
#@unittest.expectedFailure
def test_slicing_and_cache_interaction(self):
diff --git a/tests/regressiontests/serializers_regress/tests.py b/tests/regressiontests/serializers_regress/tests.py
index 4af83f8f66..9c9022dcb8 100644
--- a/tests/regressiontests/serializers_regress/tests.py
+++ b/tests/regressiontests/serializers_regress/tests.py
@@ -97,7 +97,7 @@ def pk_create(pk, klass, data):
def inherited_create(pk, klass, data):
instance = klass(id=pk,**data)
# This isn't a raw save because:
- # 1) we're testing inheritance, not field behaviour, so none
+ # 1) we're testing inheritance, not field behavior, so none
# of the field values need to be protected.
# 2) saving the child class and having the parent created
# automatically is easier than manually creating both.
diff --git a/tests/regressiontests/templates/filters.py b/tests/regressiontests/templates/filters.py
index 6b7934935d..54c12673a2 100644
--- a/tests/regressiontests/templates/filters.py
+++ b/tests/regressiontests/templates/filters.py
@@ -113,7 +113,7 @@ def get_filter_tests():
'filter-make_list03': ('{% autoescape off %}{{ a|make_list|stringformat:"s"|safe }}{% endautoescape %}', {"a": mark_safe("&")}, u"[u'&']"),
'filter-make_list04': ('{{ a|make_list|stringformat:"s"|safe }}', {"a": mark_safe("&")}, u"[u'&']"),
- # Running slugify on a pre-escaped string leads to odd behaviour,
+ # Running slugify on a pre-escaped string leads to odd behavior,
# but the result is still safe.
'filter-slugify01': ("{% autoescape off %}{{ a|slugify }} {{ b|slugify }}{% endautoescape %}", {"a": "a & b", "b": mark_safe("a &amp; b")}, u"a-b a-amp-b"),
'filter-slugify02': ("{{ a|slugify }} {{ b|slugify }}", {"a": "a & b", "b": mark_safe("a &amp; b")}, u"a-b a-amp-b"),
diff --git a/tests/regressiontests/test_client_regress/models.py b/tests/regressiontests/test_client_regress/models.py
index 4ddd957055..60cd9b1ae3 100644
--- a/tests/regressiontests/test_client_regress/models.py
+++ b/tests/regressiontests/test_client_regress/models.py
@@ -976,7 +976,7 @@ class ResponseTemplateDeprecationTests(TestCase):
class ReadLimitedStreamTest(TestCase):
"""
Tests that ensure that HttpRequest.body, HttpRequest.read() and
- HttpRequest.read(BUFFER) have proper LimitedStream behaviour.
+ HttpRequest.read(BUFFER) have proper LimitedStream behavior.
Refs #14753, #15785
"""
@@ -1017,7 +1017,7 @@ class RequestFactoryStateTest(TestCase):
"""Regression tests for #15929."""
# These tests are checking that certain middleware don't change certain
# global state. Alternatively, from the point of view of a test, they are
- # ensuring test isolation behaviour. So, unusually, it doesn't make sense to
+ # ensuring test isolation behavior. So, unusually, it doesn't make sense to
# run the tests individually, and if any are failing it is confusing to run
# them with any other set of tests.