summaryrefslogtreecommitdiff
path: root/tests/regressiontests/datatypes
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 /tests/regressiontests/datatypes
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 'tests/regressiontests/datatypes')
-rw-r--r--tests/regressiontests/datatypes/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/regressiontests/datatypes/tests.py b/tests/regressiontests/datatypes/tests.py
index eb09a5a637..e161be9344 100644
--- a/tests/regressiontests/datatypes/tests.py
+++ b/tests/regressiontests/datatypes/tests.py
@@ -72,7 +72,7 @@ class DataTypesTestCase(TestCase):
database should be unicode."""
d = Donut.objects.create(name=u'Jelly Donut', review=u'Outstanding')
newd = Donut.objects.get(id=d.id)
- self.assert_(isinstance(newd.review, unicode))
+ self.assertTrue(isinstance(newd.review, unicode))
@skipIfDBFeature('supports_timezones')
def test_error_on_timezone(self):
@@ -88,7 +88,7 @@ class DataTypesTestCase(TestCase):
a Python datetime.date, not a datetime.datetime"""
b = RumBaba.objects.create()
# Verify we didn't break DateTimeField behavior
- self.assert_(isinstance(b.baked_timestamp, datetime.datetime))
+ self.assertTrue(isinstance(b.baked_timestamp, datetime.datetime))
# We need to test this this way because datetime.datetime inherits
# from datetime.date:
- self.assert_(isinstance(b.baked_date, datetime.date) and not isinstance(b.baked_date, datetime.datetime))
+ self.assertTrue(isinstance(b.baked_date, datetime.date) and not isinstance(b.baked_date, datetime.datetime))