summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/route_server_softreset_test.py
diff options
context:
space:
mode:
authorCarl Baldwin <carl@ecbaldwin.net>2018-10-29 20:01:39 +0000
committerCarl Baldwin <carl@ecbaldwin.net>2018-10-29 20:10:19 +0000
commit8bccb4278a1c6cb291a9635a4b2252372f074b7e (patch)
treed1f9d1061a1db670fea7af527e10add4a2b09e59 /test/scenario_test/route_server_softreset_test.py
parentc8694bc8a7dccd663689f8d134b89fe3a1f37d70 (diff)
Use assertEqual in python tests
In trying to run the local tests, I found that changing these assertTrue calls to assertEqual helped me out. With this, a failure shows the actual and expected values rather than just saying "True is not False" which is less helpful.
Diffstat (limited to 'test/scenario_test/route_server_softreset_test.py')
-rw-r--r--test/scenario_test/route_server_softreset_test.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/scenario_test/route_server_softreset_test.py b/test/scenario_test/route_server_softreset_test.py
index 90096be0..8e0fe374 100644
--- a/test/scenario_test/route_server_softreset_test.py
+++ b/test/scenario_test/route_server_softreset_test.py
@@ -107,14 +107,14 @@ class GoBGPTestBase(unittest.TestCase):
time.sleep(1)
num2 = g2.get_neighbor(g1)['state']['messages']['received'].get('update', 0)
- self.assertTrue((num + 1) == num2)
+ self.assertEqual((num + 1), num2)
g3.softreset(g1, type='out')
time.sleep(1)
num3 = g2.get_neighbor(g1)['state']['messages']['received'].get('update', 0)
- self.assertTrue(num2 == num3)
+ self.assertEqual(num2, num3)
def test_03_softresetin_test2(self):
g1 = self.gobgp
@@ -131,7 +131,7 @@ class GoBGPTestBase(unittest.TestCase):
num1 = g2.get_neighbor(g1)['state']['messages']['received'].get('update', 0)
- self.assertTrue(num == num1)
+ self.assertEqual(num, num1)
if __name__ == '__main__':