summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2011-03-03 15:04:39 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2011-03-03 15:04:39 +0000
commitafd040d4d3a06fe92e3080870b2ff2095ce86a75 (patch)
treebda969614999a3fcfbf1466caa0d75e512dd1374 /django/utils
parentb7c41c1fbb2d45634dde5f7a450ba1a5aea5a8af (diff)
Updated test assertions that have been deprecated by the move to unittest2. In summary, this means:
assert_ -> assertTrue assertEquals -> assertEqual failUnless -> assertTrue For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/unittest/case.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/utils/unittest/case.py b/django/utils/unittest/case.py
index fd5623b03c..5ae602957b 100644
--- a/django/utils/unittest/case.py
+++ b/django/utils/unittest/case.py
@@ -831,8 +831,8 @@ class TestCase(unittest.TestCase):
self.fail(self._formatMessage(msg, standardMsg))
def assertDictEqual(self, d1, d2, msg=None):
- self.assert_(isinstance(d1, dict), 'First argument is not a dictionary')
- self.assert_(isinstance(d2, dict), 'Second argument is not a dictionary')
+ self.assertTrue(isinstance(d1, dict), 'First argument is not a dictionary')
+ self.assertTrue(isinstance(d2, dict), 'Second argument is not a dictionary')
if d1 != d2:
standardMsg = '%s != %s' % (safe_repr(d1, True), safe_repr(d2, True))
@@ -909,9 +909,9 @@ class TestCase(unittest.TestCase):
def assertMultiLineEqual(self, first, second, msg=None):
"""Assert that two multi-line strings are equal."""
- self.assert_(isinstance(first, basestring), (
+ self.assertTrue(isinstance(first, basestring), (
'First argument is not a string'))
- self.assert_(isinstance(second, basestring), (
+ self.assertTrue(isinstance(second, basestring), (
'Second argument is not a string'))
if first != second: