本文整理汇总了Python中wifi.scan.Cell.from_string方法的典型用法代码示例。如果您正苦于以下问题:Python Cell.from_string方法的具体用法?Python Cell.from_string怎么用?Python Cell.from_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wifi.scan.Cell
的用法示例。
在下文中一共展示了Cell.from_string方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_no_encryption
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_no_encryption(self):
cell = Cell.from_string(IWLIST_SCAN_NO_ENCRYPTION)
self.assertFalse(cell.encrypted)
self.assertEqual(cell.ssid, 'My Wireless Network')
self.assertEqual(cell.signal, -51)
self.assertEqual(cell.quality, '59/70')
self.assertEqual(cell.frequency, '2.437 GHz')
self.assertEqual(cell.mode, 'Master')
self.assertEqual(cell.channel, 6)
示例2: test_wpa2
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_wpa2(self):
cell = Cell.from_string(IWLIST_SCAN_WPA2)
self.assertTrue(cell.encrypted)
self.assertEqual(cell.encryption_type, 'wpa2')
示例3: test_absolute_quality
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_absolute_quality(self):
# https://github.com/rockymeza/wifi/pull/45
cell = Cell.from_string(ABSOLUTE_QUALITY)
self.assertEqual(cell.quality, '38/100')
self.assertEqual(cell.signal, -92)
示例4: test_wep
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_wep(self):
cell = Cell.from_string(IWLIST_SCAN_WEP)
self.assertTrue(cell.encrypted)
self.assertEqual(cell.encryption_type, 'wep')
示例5: test_list_index_error
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_list_index_error(self):
# https://github.com/rockymeza/wifi/issues/42
cell = Cell.from_string(LIST_INDEX_ERROR)
示例6: test_frequency_no_channel_output
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_frequency_no_channel_output(self):
# https://github.com/rockymeza/wifi/issues/39
cell = Cell.from_string(FREQUENCY_NO_CHANNEL_OUTPUT)
self.assertEqual(cell.channel, 149)
示例7: test_noname_cell
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_noname_cell(self):
cell = Cell.from_string(NONAME_WIRELESS_NETWORK)
self.assertEqual(cell.ssid, '')
示例8: test_no_channel_output
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_no_channel_output(self):
# https://github.com/rockymeza/wifi/issues/24
cell = Cell.from_string(NO_CHANNEL_OUTPUT)
self.assertEqual(cell.channel, 11)
示例9: test_signal_level_out_of_sixty
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_signal_level_out_of_sixty(self):
cell = Cell.from_string(ALTERNATIVE_OUTPUT2)
self.assertEqual(cell.signal, -71)
示例10: test_alternative_iwlist_output
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_alternative_iwlist_output(self):
# https://github.com/rockymeza/wifi/issues/12
cell = Cell.from_string(ALTERNATIVE_OUTPUT)
self.assertEqual(cell.quality, '78/100')
self.assertEqual(cell.signal, -92)
示例11: test_noise_data_present
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_noise_data_present(self):
cell = Cell.from_string(LIST_INDEX_ERROR)
self.assertEqual(cell.noise, -92)
示例12: test_noise_no_data
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_noise_no_data(self):
cell = Cell.from_string(IWLIST_SCAN_NO_ENCRYPTION)
self.assertEqual(cell.noise, None)
示例13: test_blank_ssid
# 需要导入模块: from wifi.scan import Cell [as 别名]
# 或者: from wifi.scan.Cell import from_string [as 别名]
def test_blank_ssid(self):
# https://github.com/rockymeza/wifi/issues/86
cell = Cell.from_string(NO_SSID_AT_ALL)
self.assertEqual(cell.ssid, None)