本文整理汇总了Python中pcs.lib.env.LibraryEnvironment._cib_upgraded方法的典型用法代码示例。如果您正苦于以下问题:Python LibraryEnvironment._cib_upgraded方法的具体用法?Python LibraryEnvironment._cib_upgraded怎么用?Python LibraryEnvironment._cib_upgraded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pcs.lib.env.LibraryEnvironment
的用法示例。
在下文中一共展示了LibraryEnvironment._cib_upgraded方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_push_cib_upgraded_live
# 需要导入模块: from pcs.lib.env import LibraryEnvironment [as 别名]
# 或者: from pcs.lib.env.LibraryEnvironment import _cib_upgraded [as 别名]
def test_push_cib_upgraded_live(self, mock_replace_cib):
env = LibraryEnvironment(self.mock_logger, self.mock_reporter)
env._cib_upgraded = True
env.push_cib(etree.XML('<cib/>'))
mock_replace_cib.assert_called_once_with(
"mock cmd runner",
'<cib/>'
)
self.assertFalse(env.cib_upgraded)
示例2: test_push_cib_upgraded_live
# 需要导入模块: from pcs.lib.env import LibraryEnvironment [as 别名]
# 或者: from pcs.lib.env.LibraryEnvironment import _cib_upgraded [as 别名]
def test_push_cib_upgraded_live(self, mock_replace_cib):
env = LibraryEnvironment(self.mock_logger, self.mock_reporter)
env._cib_upgraded = True
env.push_cib(etree.XML('<cib/>'))
mock_replace_cib.assert_called_once_with(
"mock cmd runner", '<cib/>', True
)
assert_report_item_list_equal(
env.report_processor.report_item_list,
[(
severity.INFO,
report_codes.CIB_UPGRADE_SUCCESSFUL,
{}
)]
)