示例#1
0
 def test_generate_psk(self):
     interface = wnettools.BaseWirelessInterface('wlan0')
     if 'wlan0' in wnettools.GetWirelessInterfaces():
         psk = interface.GeneratePSK({
             'essid': 'Network 1',
             'key': 'arandompassphrase'
         })
         self.assertEqual(
             psk, 'd70463014514f4b4ebb8e3aebbdec13f4437ac3a9a'
             'f084b3433f3710e658a7be')
示例#2
0
 def test_find_wireless_interface(self):
     interfaces = wnettools.GetWirelessInterfaces()
     # wlan0 may change depending on your system
     #self.assertTrue('wlan0' in interfaces)
     self.assertTrue(type(interfaces) == list)
示例#3
0
 def test_find_wireless_interface(self):
     interfaces = wnettools.GetWirelessInterfaces()
     self.assertTrue(type(interfaces) == list)