def test_random_mac_roundtrip(self):
     """ua_to_mac(mac_to_ua(mac)) should equal mac for random mac"""
     for _ in range(test_count):
         n = random.randrange(0, pow(2, 40))
         mac = format(n, "012x")
         self.assertEqual(mac, ua_to_mac(mac_to_ua(mac)))
 def test_known_ua_roundtrip(self):
     """mac_to_ua(ua_to_mac(ua)) should equal ua for known ua"""
     for ua, mac in A_ua_mac:
         self.assertEqual(ua, mac_to_ua(ua_to_mac(ua)))
 def test_known_mac_roundtrip(self):
     """ua_to_mac(mac_to_ua(mac)) should equal mac for known mac"""
     for ua, mac in A_ua_mac:
         self.assertEqual(mac, ua_to_mac(mac_to_ua(mac)))
 def test_known_ua(self):
     """mac_to_ua should give known result with known input"""
     for ua, mac in A_ua_mac:
         self.assertEqual(ua, mac_to_ua(mac))