当前位置: 首页>>代码示例>>Python>>正文


Python Cell.from_string方法代码示例

本文整理汇总了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)
开发者ID:DanLipsitt,项目名称:wifi,代码行数:11,代码来源:test_parsing.py

示例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')
开发者ID:DanLipsitt,项目名称:wifi,代码行数:6,代码来源:test_parsing.py

示例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)
开发者ID:Develoman,项目名称:wifi,代码行数:7,代码来源:test_parsing.py

示例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')
开发者ID:DanLipsitt,项目名称:wifi,代码行数:6,代码来源:test_parsing.py

示例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)
开发者ID:Develoman,项目名称:wifi,代码行数:5,代码来源:test_parsing.py

示例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)
开发者ID:Develoman,项目名称:wifi,代码行数:6,代码来源:test_parsing.py

示例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, '')
开发者ID:Develoman,项目名称:wifi,代码行数:5,代码来源:test_parsing.py

示例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)
开发者ID:Develoman,项目名称:wifi,代码行数:6,代码来源:test_parsing.py

示例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)
开发者ID:Develoman,项目名称:wifi,代码行数:5,代码来源:test_parsing.py

示例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)
开发者ID:Develoman,项目名称:wifi,代码行数:7,代码来源:test_parsing.py

示例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)
开发者ID:Evanito,项目名称:wifi,代码行数:5,代码来源:test_parsing.py

示例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)
开发者ID:Evanito,项目名称:wifi,代码行数:5,代码来源:test_parsing.py

示例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)
开发者ID:Evanito,项目名称:wifi,代码行数:6,代码来源:test_parsing.py


注:本文中的wifi.scan.Cell.from_string方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。