本文整理汇总了Python中w3af.core.data.kb.tests.test_info.MockInfo.get_uniq_id方法的典型用法代码示例。如果您正苦于以下问题:Python MockInfo.get_uniq_id方法的具体用法?Python MockInfo.get_uniq_id怎么用?Python MockInfo.get_uniq_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类w3af.core.data.kb.tests.test_info.MockInfo
的用法示例。
在下文中一共展示了MockInfo.get_uniq_id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_all_uniq_ids_iter_include_ids
# 需要导入模块: from w3af.core.data.kb.tests.test_info import MockInfo [as 别名]
# 或者: from w3af.core.data.kb.tests.test_info.MockInfo import get_uniq_id [as 别名]
def test_get_all_uniq_ids_iter_include_ids(self):
i1 = MockInfo()
kb.append('a', 'b', i1)
uniq_ids = [u for u in kb.get_all_uniq_ids_iter(include_ids=[i1.get_uniq_id()])]
self.assertEqual(uniq_ids, [i1.get_uniq_id()])
示例2: test_get_by_uniq_id_duplicated_ignores_second
# 需要导入模块: from w3af.core.data.kb.tests.test_info import MockInfo [as 别名]
# 或者: from w3af.core.data.kb.tests.test_info.MockInfo import get_uniq_id [as 别名]
def test_get_by_uniq_id_duplicated_ignores_second(self):
"""
TODO: Analyze this case, i1 and i2 have both the same ID because they
have all the same information (this is very very uncommon in a
real w3af run).
Note that in the get_by_uniq_id call i2 is not returned.
"""
i1 = MockInfo()
i2 = MockInfo()
kb.append('a', 'b', i1)
kb.append('a', 'b', i2)
i1_copy = kb.get_by_uniq_id(i1.get_uniq_id())
self.assertEqual(i1_copy, i1)
示例3: test_get_by_uniq_id
# 需要导入模块: from w3af.core.data.kb.tests.test_info import MockInfo [as 别名]
# 或者: from w3af.core.data.kb.tests.test_info.MockInfo import get_uniq_id [as 别名]
def test_get_by_uniq_id(self):
i1 = MockInfo()
kb.append('a', 'b', i1)
i1_copy = kb.get_by_uniq_id(i1.get_uniq_id())
self.assertEqual(i1_copy, i1)