Example #1
0
 def test_generate_random_mac_address(self):
     mac_list = BAtk.BaseAttack.generate_random_mac_address(10)
     for mac in mac_list:
         with self.subTest(mac=mac):
             self.assertTrue(MACAddress._is_mac_address(mac))
Example #2
0
 def test_is_mac_address_valid(self):
     self.assertTrue(MACAddress._is_mac_address("00:80:41:ae:fd:7e"))
Example #3
0
 def test_is_mac_address_invalid(self):
     self.assertFalse(MACAddress._is_mac_address("00:80:41:aec:fd:7e"))
Example #4
0
 def test_is_mac_address_list_invalid(self):
     self.assertFalse(
         MACAddress._is_mac_address(
             ["00:80:41:aec:fd:7e", "00-80-41-aec-fd-7e"]))
Example #5
0
 def test_is_mac_address_list_valid(self):
     self.assertTrue(
         MACAddress._is_mac_address(
             ["00:80:41:ae:fd:7e", "00-80-41-ae-fd-7e"]))
Example #6
0
 def test_is_mac_address_minus_invalid(self):
     self.assertFalse(MACAddress._is_mac_address("00-80-41-aec-fd-7e"))
Example #7
0
 def test_is_mac_address_minus_valid(self):
     self.assertTrue(MACAddress._is_mac_address("00-80-41-ae-fd-7e"))
Example #8
0
 def test_is_mac_address_empty(self):
     self.assertFalse(MACAddress._is_mac_address(""))