2 """Test framework utility functions tests"""
5 from framework import VppTestRunner
6 from vpp_papi import mac_pton, mac_ntop
9 class TestUtil (unittest.TestCase):
10 """ Test framework utility tests """
13 def is_tagged_run_solo(cls):
14 """ if the test case class is timing-sensitive - return true """
18 def has_tag(cls, tag):
19 """ if the test case has a given tag - return true """
21 return tag in cls.test_tags
22 except AttributeError:
26 def test_mac_to_binary(self):
27 """ MAC to binary and back """
28 mac = 'aa:bb:cc:dd:ee:ff'
31 self.assertEqual(type(mac), type(mac2))
32 self.assertEqual(mac2, mac)
35 if __name__ == '__main__':
36 unittest.main(testRunner=VppTestRunner)