diff options
Diffstat (limited to 'test/test_bfd.py')
-rw-r--r-- | test/test_bfd.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/test/test_bfd.py b/test/test_bfd.py index 423832b55a2..9bae4fe5933 100644 --- a/test/test_bfd.py +++ b/test/test_bfd.py @@ -2,26 +2,30 @@ """ BFD tests """ from __future__ import division -import unittest -import hashlib + import binascii +import hashlib import time -from struct import pack, unpack +import unittest from random import randint, shuffle, getrandbits from socket import AF_INET, AF_INET6, inet_ntop -from scapy.packet import Raw -from scapy.layers.l2 import Ether +from struct import pack, unpack + +import six from scapy.layers.inet import UDP, IP from scapy.layers.inet6 import IPv6 +from scapy.layers.l2 import Ether +from scapy.packet import Raw + from bfd import VppBFDAuthKey, BFD, BFDAuthType, VppBFDUDPSession, \ BFDDiagCode, BFDState, BFD_vpp_echo from framework import VppTestCase, VppTestRunner, running_extended_tests -from vpp_pg_interface import CaptureTimeoutError, is_ipv6_misc -from vpp_lo_interface import VppLoInterface from util import ppp -from vpp_papi_provider import UnexpectedApiReturnValueError from vpp_ip import DpoProto from vpp_ip_route import VppIpRoute, VppRoutePath +from vpp_lo_interface import VppLoInterface +from vpp_papi_provider import UnexpectedApiReturnValueError +from vpp_pg_interface import CaptureTimeoutError, is_ipv6_misc USEC_IN_SEC = 1000000 @@ -602,7 +606,7 @@ def verify_udp(test, packet): def verify_event(test, event, expected_state): """ Verify correctness of event values. """ e = event - test.logger.debug("BFD: Event: %s" % repr(e)) + test.logger.debug("BFD: Event: %s" % six.reprlib(e)) test.assert_equal(e.sw_if_index, test.vpp_session.interface.sw_if_index, "BFD interface index") |