diff options
Diffstat (limited to 'test/scenario_test/route_server_test2.py')
-rw-r--r-- | test/scenario_test/route_server_test2.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/scenario_test/route_server_test2.py b/test/scenario_test/route_server_test2.py index 82c0656f..08b984ae 100644 --- a/test/scenario_test/route_server_test2.py +++ b/test/scenario_test/route_server_test2.py @@ -89,10 +89,15 @@ class GoBGPTestBase(unittest.TestCase): def test_04_withdraw_path(self): self.clients['g2'].local('gobgp global rib del 10.0.0.0/24') time.sleep(1) - s = self.gobgp.get_neighbor(self.clients['g2'])['state'] - self.assertEqual(s.get('advertised', 0), 1) - self.assertEqual(s.get('accepted'), None) # means info['accepted'] == 0 - self.assertEqual(s.get('received'), None) # means info['received'] == 0 + afisafis = self.gobgp.get_neighbor(self.clients['g2'])['afi_safis'] + advertised = 0 + for afisafi in afisafis: + s = afisafi.get('state') + advertised += s.get('advertised') + self.assertEqual(s.get('accepted'), None) # means info['accepted'] == 0 + self.assertEqual(s.get('received'), None) # means info['received'] == 0 + + self.assertEqual(advertised, 1) if __name__ == '__main__': |