summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2007-09-03 23:14:51 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2007-09-03 23:14:51 +0000
commitbce7de96477086f98f8cde8aef41a15e6e17b8af (patch)
tree5b4de18bbc5c3ddd997524103e50fe5698b2128c /tests
parent853f9c7db9f506de20228eb74d9d34abeba10dbf (diff)
Removed some duplication in the Django `TestCase` methods by introducing a `to_list` function for putting a value into a list if it's not already one.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/test_client_regress/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/regressiontests/test_client_regress/models.py b/tests/regressiontests/test_client_regress/models.py
index aa18a48852..6ec093e8a5 100644
--- a/tests/regressiontests/test_client_regress/models.py
+++ b/tests/regressiontests/test_client_regress/models.py
@@ -75,7 +75,7 @@ class AssertTemplateUsedTests(TestCase):
try:
self.assertTemplateUsed(response, 'Empty POST Template')
except AssertionError, e:
- self.assertEquals(str(e), "Template 'Empty POST Template' was not used to render the response. Actual template was 'Empty GET Template'")
+ self.assertEquals(str(e), "Template 'Empty POST Template' was not a template used to render the response. Actual template(s) used: Empty GET Template")
def test_multiple_context(self):
"Template assertions work when there are multiple contexts"
@@ -101,7 +101,7 @@ class AssertTemplateUsedTests(TestCase):
try:
self.assertTemplateUsed(response, "Valid POST Template")
except AssertionError, e:
- self.assertEquals(str(e), "Template 'Valid POST Template' was not one of the templates used to render the response. Templates used: form_view.html, base.html")
+ self.assertEquals(str(e), "Template 'Valid POST Template' was not a template used to render the response. Actual template(s) used: form_view.html, base.html")
class AssertRedirectsTests(TestCase):
def test_redirect_page(self):