comparison test/test_actions.py @ 5649:f8893e1cde0d

assert_ is depricated. Replacing with assertTrue to reduce logs in travisci.
author John Rouillard <rouilj@ieee.org>
date Fri, 15 Mar 2019 20:29:00 -0400
parents 2ce41b8dffaf
children cad18de2b988
comparison
equal deleted inserted replaced
5648:a4514df51ded 5649:f8893e1cde0d
71 class RetireActionTestCase(ActionTestCase): 71 class RetireActionTestCase(ActionTestCase):
72 def testRetireAction(self): 72 def testRetireAction(self):
73 self.client.db.security.hasPermission = true 73 self.client.db.security.hasPermission = true
74 self.client._ok_message = [] 74 self.client._ok_message = []
75 RetireAction(self.client).handle() 75 RetireAction(self.client).handle()
76 self.assert_(len(self.client._ok_message) == 1) 76 self.assertTrue(len(self.client._ok_message) == 1)
77 77
78 def testNoPermission(self): 78 def testNoPermission(self):
79 self.assertRaises(Unauthorised, RetireAction(self.client).execute) 79 self.assertRaises(Unauthorised, RetireAction(self.client).execute)
80 80
81 def testDontRetireAdminOrAnonymous(self): 81 def testDontRetireAdminOrAnonymous(self):
96 # db_test_base as part of retire. 96 # db_test_base as part of retire.
97 def testRestoreAction(self): 97 def testRestoreAction(self):
98 self.client.db.security.hasPermission = true 98 self.client.db.security.hasPermission = true
99 self.client._ok_message = [] 99 self.client._ok_message = []
100 RestoreAction(self.client).handle() 100 RestoreAction(self.client).handle()
101 self.assert_(len(self.client._ok_message) == 1) 101 self.assertTrue(len(self.client._ok_message) == 1)
102 102
103 def testNoPermission(self): 103 def testNoPermission(self):
104 self.assertRaises(Unauthorised, RestoreAction(self.client).execute) 104 self.assertRaises(Unauthorised, RestoreAction(self.client).execute)
105 105
106 class SearchActionTestCase(ActionTestCase): 106 class SearchActionTestCase(ActionTestCase):

Roundup Issue Tracker: http://roundup-tracker.org/