Replace assertEquals with assertEqual
The method assertEquals has been deprecated since python 2.7. http://docs.python.org/2/library/unittest.html#deprecated-aliases Also in Python 3, a deprecated warning is raised when using assertEquals therefore we should use assertEqual instead. Fixes bug #1221601 Change-Id: Id502cfbc210c6c3fe0a256d5350e159ffa220141
This commit is contained in:
parent
1a25274e7a
commit
902dc88b4c
@ -517,8 +517,8 @@ class IptablesManagerStateFulTestCase(base.BaseTestCase):
|
||||
|
||||
self.mox.ReplayAll()
|
||||
acc = self.iptables.get_traffic_counters('OUTPUT')
|
||||
self.assertEquals(acc['pkts'], 1600)
|
||||
self.assertEquals(acc['bytes'], 263604)
|
||||
self.assertEqual(acc['pkts'], 1600)
|
||||
self.assertEqual(acc['bytes'], 263604)
|
||||
|
||||
self.mox.VerifyAll()
|
||||
|
||||
@ -548,8 +548,8 @@ class IptablesManagerStateFulTestCase(base.BaseTestCase):
|
||||
|
||||
self.mox.ReplayAll()
|
||||
acc = self.iptables.get_traffic_counters('OUTPUT', zero=True)
|
||||
self.assertEquals(acc['pkts'], 1600)
|
||||
self.assertEquals(acc['bytes'], 263604)
|
||||
self.assertEqual(acc['pkts'], 1600)
|
||||
self.assertEqual(acc['bytes'], 263604)
|
||||
|
||||
self.mox.VerifyAll()
|
||||
|
||||
|
@ -509,8 +509,8 @@ class TestBasicRouterOperations(base.BaseTestCase):
|
||||
for call in nat.mock_calls:
|
||||
name, args, kwargs = call
|
||||
if name == 'add_rule':
|
||||
self.assertEquals(args, ('snat', '-j $float-snat'))
|
||||
self.assertEquals(kwargs, {})
|
||||
self.assertEqual(args, ('snat', '-j $float-snat'))
|
||||
self.assertEqual(kwargs, {})
|
||||
break
|
||||
|
||||
def testRoutersWithAdminStateDown(self):
|
||||
|
Loading…
Reference in New Issue
Block a user