Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 420a35b9b752f5030c1c01616f41601812250aad 1 parent 255cb39
@malcolmt malcolmt authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/test/testcases.py
View
4 django/test/testcases.py
@@ -278,7 +278,7 @@ def assertRedirects(self, response, expected_url, status_code=302,
"""
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 @@ def _fixture_teardown(self):
restore_transaction_methods()
transaction.rollback()
transaction.leave_transaction_management()
- connection.close()
+ connection.close()
Please sign in to comment.
Something went wrong with that request. Please try again.