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


Python SUBSCRIPTION_MANAGER.diag_get_mnrs方法代码示例

本文整理汇总了Python中mpx.service.subscription_manager.SUBSCRIPTION_MANAGER.diag_get_mnrs方法的典型用法代码示例。如果您正苦于以下问题:Python SUBSCRIPTION_MANAGER.diag_get_mnrs方法的具体用法?Python SUBSCRIPTION_MANAGER.diag_get_mnrs怎么用?Python SUBSCRIPTION_MANAGER.diag_get_mnrs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mpx.service.subscription_manager.SUBSCRIPTION_MANAGER的用法示例。


在下文中一共展示了SUBSCRIPTION_MANAGER.diag_get_mnrs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _print_mnrs

# 需要导入模块: from mpx.service.subscription_manager import SUBSCRIPTION_MANAGER [as 别名]
# 或者: from mpx.service.subscription_manager.SUBSCRIPTION_MANAGER import diag_get_mnrs [as 别名]
 def _print_mnrs(self):
     print ""
     print "*"*60
     for s in SUBSCRIPTION_MANAGER.diag_get_mnrs():
         print s
     print "*"*60
     return
开发者ID:mcruse,项目名称:monotone,代码行数:9,代码来源:_test_case_subscription_manager.py

示例2: test_destroy_batch

# 需要导入模块: from mpx.service.subscription_manager import SUBSCRIPTION_MANAGER [as 别名]
# 或者: from mpx.service.subscription_manager.SUBSCRIPTION_MANAGER import diag_get_mnrs [as 别名]
 def test_destroy_batch(self):
     sids = []
     for i in range(2):
         # BatchNodes change "really fast."
         sid = SUBSCRIPTION_MANAGER.create_polled(self.nrtB10)
         # Make sure it comes up.
         t1 = time.time()
         self.__values_changing(sid)
         sids.append(sid)
     # Double check the values are changing.
     for sid in sids:
         self.__values_changing(sid)
     # Now nuke one of the suscriptions and see that the other stays valid.
     sid = sids.pop(0)
     SUBSCRIPTION_MANAGER.destroy(sid)
     try:
         SUBSCRIPTION_MANAGER.destroy(sid)
     except ENoSuchSubscription:
         pass
     else:
         raise "No such subscription not detected."
     # Make sure that the other subscription is valid.
     sid = sids.pop(0)
     self.__values_changing(sid)
     if len(SUBSCRIPTION_MANAGER.diag_get_mnrs()) != 10:
         raise (
             "Bogus test, there should be 10 mnr at this point, not %r." %
             len(SUBSCRIPTION_MANAGER.diag_get_mnrs()))
     if len(SUBSCRIPTION_MANAGER.diag_get_mnbs()) != 1:
         raise (
             "Bogus test, there should be 1 mnb at this point, not %r." %
             len(SUBSCRIPTION_MANAGER.diag_get_mnbs()))
     SUBSCRIPTION_MANAGER.destroy(sid)
     # Make sure that the mnr is removed when the last snr is deleted.
     if len(SUBSCRIPTION_MANAGER.diag_get_mnrs()) != 0:
         raise (
             "There should not be any mnrs at this point,"
             " but there are %r." %
             len(SUBSCRIPTION_MANAGER.diag_get_mnrs()))
     # Finally, make sure that the mnb is removed when the last mnr is
     # deleted.
     if len(SUBSCRIPTION_MANAGER.diag_get_mnbs()) != 0:
         raise (
             "There should not be any mnbs at this point,"
             " but there are %r." %
             len(SUBSCRIPTION_MANAGER.diag_get_mnbs()))
     return
开发者ID:mcruse,项目名称:monotone,代码行数:49,代码来源:_test_case_subscription_manager.py


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