diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-03-20 01:37:34 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-03-20 01:37:34 +0000 |
| commit | 420a35b9b752f5030c1c01616f41601812250aad (patch) | |
| tree | a042199ed0095f39fb289f5cf9decb767ddcd5ee | |
| parent | 255cb391d16238d07ca530e3e2d41c897858231d (diff) | |
Python 2.3 fix: assertTrue *still* doesn't exist in Python 2.3
The tests and testing framework should use failUnless() instead.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10100 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/test/testcases.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py index cf1bf6ea63..5faef11ba2 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -278,7 +278,7 @@ class TransactionTestCase(unittest.TestCase): """ if hasattr(response, 'redirect_chain'): # The request was a followed redirect - self.assertTrue(len(response.redirect_chain) > 0, + self.failUnless(len(response.redirect_chain) > 0, ("Response didn't redirect as expected: Response code was %d" " (expected %d)" % (response.status_code, status_code))) @@ -453,4 +453,4 @@ class TestCase(TransactionTestCase): restore_transaction_methods() transaction.rollback() transaction.leave_transaction_management() - connection.close()
\ No newline at end of file + connection.close() |
