本文整理汇总了Python中oslo_upgradecheck.upgradecheck.Code.SUCCESS属性的典型用法代码示例。如果您正苦于以下问题:Python Code.SUCCESS属性的具体用法?Python Code.SUCCESS怎么用?Python Code.SUCCESS使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类oslo_upgradecheck.upgradecheck.Code
的用法示例。
在下文中一共展示了Code.SUCCESS属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test__numactl_check_ok
# 需要导入模块: from oslo_upgradecheck.upgradecheck import Code [as 别名]
# 或者: from oslo_upgradecheck.upgradecheck.Code import SUCCESS [as 别名]
def test__numactl_check_ok(self, mock_cmd_exists):
mock_cmd_exists.return_value = True
check_result = self.cmd._numactl_check()
self.assertEqual(
Code.SUCCESS, check_result.code)
示例2: test__sample_check
# 需要导入模块: from oslo_upgradecheck.upgradecheck import Code [as 别名]
# 或者: from oslo_upgradecheck.upgradecheck.Code import SUCCESS [as 别名]
def test__sample_check(self):
check_result = self.cmd._sample_check()
self.assertEqual(
Code.SUCCESS, check_result.code)
示例3: test__check_placeholder
# 需要导入模块: from oslo_upgradecheck.upgradecheck import Code [as 别名]
# 或者: from oslo_upgradecheck.upgradecheck.Code import SUCCESS [as 别名]
def test__check_placeholder(self):
check_result = self.cmd._check_placeholder()
self.assertEqual(
Code.SUCCESS, check_result.code)
示例4: test_minimum_nova_api_version_ok
# 需要导入模块: from oslo_upgradecheck.upgradecheck import Code [as 别名]
# 或者: from oslo_upgradecheck.upgradecheck.Code import SUCCESS [as 别名]
def test_minimum_nova_api_version_ok(self):
# Tests that the default [nova_client]/api_version meets the minimum
# required version.
result = self.cmd._minimum_nova_api_version()
self.assertEqual(Code.SUCCESS, result.code)
示例5: test__check_placeholder
# 需要导入模块: from oslo_upgradecheck.upgradecheck import Code [as 别名]
# 或者: from oslo_upgradecheck.upgradecheck.Code import SUCCESS [as 别名]
def test__check_placeholder(self):
check_result = self.cmd._check_placeholder()
self.assertEqual(
Code.SUCCESS, check_result.code,
"Placeholder should always succeed.")
示例6: test__check_healthpolicy_success
# 需要导入模块: from oslo_upgradecheck.upgradecheck import Code [as 别名]
# 或者: from oslo_upgradecheck.upgradecheck.Code import SUCCESS [as 别名]
def test__check_healthpolicy_success(self):
healthpolv1_1 = db_api.policy_create(self.ctx, self.healthpolv1_1_data)
self.addCleanup(db_api.policy_delete, self.ctx, healthpolv1_1.id)
scalepol = db_api.policy_create(self.ctx, self.scalepol_data)
self.addCleanup(db_api.policy_delete, self.ctx, scalepol.id)
check_result = self.cmd._check_healthpolicy()
self.assertEqual(Code.SUCCESS, check_result.code)