diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-07-10 14:06:08 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-08-08 21:24:48 +0900 |
commit | 71e56c542e6a167dc3cd983aae2881a3c24c162a (patch) | |
tree | a449e3ed0889940fe47bb5f4ffca91228a4cc7e8 /test/scenario_test/aspath_test.py | |
parent | 3dc23d3075f13f2976afd255ef2fd9b1410acc77 (diff) |
rpc cleanup
- clean up RPC function names
- rewrite gobgp command to use the api instead of config package
- delete unused client package
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/aspath_test.py')
-rw-r--r-- | test/scenario_test/aspath_test.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/scenario_test/aspath_test.py b/test/scenario_test/aspath_test.py index 25518bfa..d6349efe 100644 --- a/test/scenario_test/aspath_test.py +++ b/test/scenario_test/aspath_test.py @@ -73,12 +73,12 @@ class GoBGPTestBase(unittest.TestCase): def test_02_check_reject_as_loop(self): def f(): - adj = self.g2.get_neighbor(self.q1)['state']['adj-table'] - self.assertTrue('received' in adj) - self.assertEqual(adj['received'], 1) + s = self.g2.get_neighbor(self.q1)['state'] + self.assertTrue('received' in s) + self.assertEqual(s.get('received', 0), 1) # hacky. 'accepted' is zero so the key was deleted due to # omitempty tag in bgp_configs.go. - self.assertFalse('accepted' in adj) + self.assertFalse('accepted' in s) assert_several_times(f) @@ -89,11 +89,11 @@ class GoBGPTestBase(unittest.TestCase): def test_04_check_accept_as_loop(self): def f(): - adj = self.g2.get_neighbor(self.q1)['state']['adj-table'] - self.assertTrue('received' in adj) - self.assertEqual(adj['received'], 1) - self.assertTrue('accepted' in adj) - self.assertEqual(adj['accepted'], 1) + s = self.g2.get_neighbor(self.q1)['state'] + self.assertTrue('received' in s) + self.assertEqual(s.get('received', 0), 1) + self.assertTrue('accepted' in s) + self.assertEqual(s.get('accepted', 0), 1) assert_several_times(f) |