def test_unencrypted(self): cell = Cell() cell.ssid = 'SSID' cell.encrypted = False scheme = Scheme.for_cell('wlan0', 'test', cell) self.assertEqual(scheme.options, { 'wireless-essid': 'SSID', 'wireless-channel': 'auto', })
def test_wep(self): cell = Cell() cell.ssid = 'SSID' cell.encrypted = True cell.encryption_type = 'wep' scheme = Scheme.for_cell('wlan0', 'test', cell, 'passkey') self.assertEqual(scheme.options, { 'wireless-essid': 'SSID', 'wireless-key': 'passkey', })
def test_wpa(self): cell = Cell() cell.ssid = 'SSID' cell.encrypted = True cell.encryption_type = 'wpa' scheme = Scheme.for_cell('wlan0', 'test', cell, 'passkey') self.assertEqual(scheme.options, { 'wpa-ssid': 'SSID', 'wpa-psk': 'ea1548d4e8850c8d94c5ef9ed6fe483981b64c1436952cb1bf80c08a68cdc763', 'wireless-channel': 'auto', })
def test_wpa(self): cell = Cell() cell.ssid = 'SSID' cell.encrypted = True cell.encryption_type = 'wpa' scheme = Scheme.for_cell('wlan0', 'test', cell, 'passkey') self.assertEqual( scheme.options, { 'wpa-ssid': 'SSID', 'wpa-psk': 'ea1548d4e8850c8d94c5ef9ed6fe483981b64c1436952cb1bf80c08a68cdc763', 'wireless-channel': 'auto', })