summaryrefslogtreecommitdiff
path: root/tests/modeltests/validators/tests.py
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/modeltests/validators/tests.py
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/modeltests/validators/tests.py')
-rw-r--r--tests/modeltests/validators/tests.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/modeltests/validators/tests.py b/tests/modeltests/validators/tests.py
index 6fe154288d..e58526285b 100644
--- a/tests/modeltests/validators/tests.py
+++ b/tests/modeltests/validators/tests.py
@@ -141,18 +141,18 @@ def create_simple_test_method(validator, expected, value, num):
class TestSimpleValidators(TestCase):
def test_single_message(self):
v = ValidationError('Not Valid')
- self.assertEquals(str(v), "[u'Not Valid']")
- self.assertEquals(repr(v), "ValidationError([u'Not Valid'])")
+ self.assertEqual(str(v), "[u'Not Valid']")
+ self.assertEqual(repr(v), "ValidationError([u'Not Valid'])")
def test_message_list(self):
v = ValidationError(['First Problem', 'Second Problem'])
- self.assertEquals(str(v), "[u'First Problem', u'Second Problem']")
- self.assertEquals(repr(v), "ValidationError([u'First Problem', u'Second Problem'])")
+ self.assertEqual(str(v), "[u'First Problem', u'Second Problem']")
+ self.assertEqual(repr(v), "ValidationError([u'First Problem', u'Second Problem'])")
def test_message_dict(self):
v = ValidationError({'first': 'First Problem'})
- self.assertEquals(str(v), "{'first': 'First Problem'}")
- self.assertEquals(repr(v), "ValidationError({'first': 'First Problem'})")
+ self.assertEqual(str(v), "{'first': 'First Problem'}")
+ self.assertEqual(repr(v), "ValidationError({'first': 'First Problem'})")
test_counter = 0
for validator, value, expected in TEST_DATA: