diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/scenario_test/bgp_router_test.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py index 4f7e981d..10821137 100644 --- a/test/scenario_test/bgp_router_test.py +++ b/test/scenario_test/bgp_router_test.py @@ -27,7 +27,7 @@ from noseplugin import OptionParser, parser_option from itertools import chain import ryu.lib.pcaplib as pcap from ryu.lib.packet.packet import Packet -from ryu.lib.packet.bgp import BGPMessage +from ryu.lib.packet.bgp import BGPMessage, BGPUpdate class GoBGPTestBase(unittest.TestCase): @@ -385,7 +385,8 @@ class GoBGPTestBase(unittest.TestCase): last = Packet(pkt[1]).protocols[-1] if type(last) == str: pkt = BGPMessage.parser(last)[0] - cnt += len(pkt.withdrawn_routes) + if type(pkt) == BGPUpdate: + cnt += len(pkt.withdrawn_routes) self.assertTrue(cnt == 1) |