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


Python MockInfo.get_uniq_id方法代码示例

本文整理汇总了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()])
开发者ID:andresriancho,项目名称:w3af,代码行数:9,代码来源:test_knowledge_base.py

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

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


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