-#!/usr/bin/env python
+#!/usr/bin/env python3
import unittest
import random
super(TestL2xc, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestL2xc, cls).tearDownClass()
+
def setUp(self):
super(TestL2xc, self).setUp()
self.reset_packet_infos()
Show various debug prints after each test.
"""
super(TestL2xc, self).tearDown()
- if not self.vpp_dead:
- self.logger.info(self.vapi.ppcli("show l2patch"))
+
+ def show_commands_at_teardown(self):
+ self.logger.info(self.vapi.ppcli("show l2patch"))
@classmethod
def create_host_lists(cls, count):
try:
ip = packet[IP]
udp = packet[UDP]
- payload_info = self.payload_to_info(str(packet[Raw]))
+ payload_info = self.payload_to_info(packet[Raw])
packet_index = payload_info.index
self.assertEqual(payload_info.dst, dst_sw_if_index)
self.logger.debug("Got packet on port %s: src=%u (id=%u)" %