本文整理匯總了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)