本文整理汇总了Python中asynctest.mock.Mock.is_member方法的典型用法代码示例。如果您正苦于以下问题:Python Mock.is_member方法的具体用法?Python Mock.is_member怎么用?Python Mock.is_member使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类asynctest.mock.Mock
的用法示例。
在下文中一共展示了Mock.is_member方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_node_status_member
# 需要导入模块: from asynctest.mock import Mock [as 别名]
# 或者: from asynctest.mock.Mock import is_member [as 别名]
def test_node_status_member(self, app, community):
community.parameters = CoroutineMock(return_value = {'sigValidity': 1000})
base_graph = BaseGraph(app, community)
certifier = Mock(specs='core.registry.Identity')
certifier.pubkey = "7Aqw6Efa9EzE7gtsc8SveLLrM7gm6NEGoywSv4FJx6pZ"
certifier.uid = "first_identity"
certifier.is_member = CoroutineMock(spec='core.registry.Identity.is_member', return_value=False)
account_identity = Mock(specs='core.registry.Identity')
account_identity.pubkey = "FADxcH5LmXGmGFgdixSes6nWnC4Vb4pRUBYT81zQRhjn"
account_identity.uid = "second_uid"
account_identity.is_member = CoroutineMock(spec='core.registry.Identity.is_member', return_value=True)
async def exec_test():
self.assertEquals((await base_graph.node_status(certifier, account_identity)), NodeStatus.OUT)
self.assertEquals((await base_graph.node_status(account_identity, account_identity)), NodeStatus.HIGHLIGHTED)
self.lp.run_until_complete(exec_test())