From 3235c0618cfc320c0ad751d83d850ec714fa1c49 Mon Sep 17 00:00:00 2001 From: Wataru Ishida Date: Sat, 20 Aug 2016 19:15:53 +0000 Subject: api/cli: kill cmd package custom path/destination structs reuse table package Signed-off-by: Wataru Ishida --- test/scenario_test/bgp_router_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/scenario_test/bgp_router_test.py') diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py index f6831f79..3154df21 100644 --- a/test/scenario_test/bgp_router_test.py +++ b/test/scenario_test/bgp_router_test.py @@ -333,10 +333,10 @@ class GoBGPTestBase(unittest.TestCase): paths = g1.get_adj_rib_out(q1, '30.0.0.0/24') self.assertTrue(len(paths) == 1) - self.assertTrue(paths[0]['source-id'] == '') + self.assertTrue('source-id' not in paths[0]) paths = g1.get_adj_rib_out(q2, '30.0.0.0/24') self.assertTrue(len(paths) == 1) - self.assertTrue(paths[0]['source-id'] == '') + self.assertTrue('source-id' not in paths[0]) g1.local('gobgp global rib del 30.0.0.0/24') @@ -405,8 +405,8 @@ class GoBGPTestBase(unittest.TestCase): cnt2 = 0 g = next_prefix() n = g.next() - for path in g1.get_global_rib(): - if path['prefix'] == n: + for path in g1.local("gobgp global rib", capture=True).split('\n')[1:]: + if [elem for elem in path.split(' ') if elem != ''][1] == n: try: cnt2 += 1 n = g.next() -- cgit v1.2.3