diff options
author | Wataru Ishida <ishida.wataru@lab.ntt.co.jp> | 2016-08-20 19:15:53 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-08-25 15:53:14 +0900 |
commit | 3235c0618cfc320c0ad751d83d850ec714fa1c49 (patch) | |
tree | 9bbc51cdb4e549dcb0567248d16c99dffd74e68d /test/scenario_test/bgp_router_test.py | |
parent | b3c874da2581eb71d8c137d956e792565193ec0e (diff) |
api/cli: kill cmd package custom path/destination structs
reuse table package
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/bgp_router_test.py')
-rw-r--r-- | test/scenario_test/bgp_router_test.py | 8 |
1 files changed, 4 insertions, 4 deletions
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'] == '<nil>') + 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'] == '<nil>') + 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() |