sobjects/test/unittest_notification.py
changeset 7791 31bb51ea5485
parent 7244 a918f76441ce
child 7980 c85bea091a6c
--- a/sobjects/test/unittest_notification.py	Wed Sep 14 09:10:58 2011 +0200
+++ b/sobjects/test/unittest_notification.py	Wed Sep 14 09:11:50 2011 +0200
@@ -30,29 +30,29 @@
     def test_base(self):
         msgid1 = construct_message_id('testapp', 21)
         msgid2 = construct_message_id('testapp', 21)
-        self.failIfEqual(msgid1, msgid2)
-        self.failIf('&' in msgid1)
-        self.failIf('=' in msgid1)
-        self.failIf('/' in msgid1)
-        self.failIf('+' in msgid1)
+        self.assertNotEqual(msgid1, msgid2)
+        self.assertFalse('&' in msgid1)
+        self.assertFalse('=' in msgid1)
+        self.assertFalse('/' in msgid1)
+        self.assertFalse('+' in msgid1)
         values = parse_message_id(msgid1, 'testapp')
-        self.failUnless(values)
+        self.assertTrue(values)
         # parse_message_id should work with or without surrounding <>
-        self.failUnlessEqual(values, parse_message_id(msgid1[1:-1], 'testapp'))
-        self.failUnlessEqual(values['eid'], '21')
-        self.failUnless('timestamp' in values)
-        self.failUnlessEqual(parse_message_id(msgid1[1:-1], 'anotherapp'), None)
+        self.assertEqual(values, parse_message_id(msgid1[1:-1], 'testapp'))
+        self.assertEqual(values['eid'], '21')
+        self.assertTrue('timestamp' in values)
+        self.assertEqual(parse_message_id(msgid1[1:-1], 'anotherapp'), None)
 
     def test_notimestamp(self):
         msgid1 = construct_message_id('testapp', 21, False)
         msgid2 = construct_message_id('testapp', 21, False)
         values = parse_message_id(msgid1, 'testapp')
-        self.failUnlessEqual(values, {'eid': '21'})
+        self.assertEqual(values, {'eid': '21'})
 
     def test_parse_message_doesnt_raise(self):
-        self.failUnlessEqual(parse_message_id('oijioj@bla.bla', 'tesapp'), None)
-        self.failUnlessEqual(parse_message_id('oijioj@bla', 'tesapp'), None)
-        self.failUnlessEqual(parse_message_id('oijioj', 'tesapp'), None)
+        self.assertEqual(parse_message_id('oijioj@bla.bla', 'tesapp'), None)
+        self.assertEqual(parse_message_id('oijioj@bla', 'tesapp'), None)
+        self.assertEqual(parse_message_id('oijioj', 'tesapp'), None)
 
 
     def test_nonregr_empty_message_id(self):
@@ -86,7 +86,7 @@
         req = self.request()
         u = self.create_user(req, 'toto')
         u.cw_adapt_to('IWorkflowable').fire_transition('deactivate', comment=u'yeah')
-        self.failIf(MAILBOX)
+        self.assertFalse(MAILBOX)
         self.commit()
         self.assertEqual(len(MAILBOX), 1)
         email = MAILBOX[0]