本文整理汇总了Python中robottelo.cli.discoveryrule.DiscoveryRule.delete方法的典型用法代码示例。如果您正苦于以下问题:Python DiscoveryRule.delete方法的具体用法?Python DiscoveryRule.delete怎么用?Python DiscoveryRule.delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类robottelo.cli.discoveryrule.DiscoveryRule
的用法示例。
在下文中一共展示了DiscoveryRule.delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_positive_delete
# 需要导入模块: from robottelo.cli.discoveryrule import DiscoveryRule [as 别名]
# 或者: from robottelo.cli.discoveryrule.DiscoveryRule import delete [as 别名]
def test_positive_delete(self):
"""Delete existing Discovery Rule
@id: c9b88a94-13c4-496f-a5c1-c088187250dc
@Assert: Rule should be successfully deleted
"""
rule = self._make_discoveryrule()
DiscoveryRule.delete({u'id': rule['id']})
with self.assertRaises(CLIReturnCodeError):
DiscoveryRule.info({u'id': rule['id']})
示例2: test_positive_delete
# 需要导入模块: from robottelo.cli.discoveryrule import DiscoveryRule [as 别名]
# 或者: from robottelo.cli.discoveryrule.DiscoveryRule import delete [as 别名]
def test_positive_delete(self):
"""Delete existing Discovery Rule
:id: c9b88a94-13c4-496f-a5c1-c088187250dc
:expectedresults: Rule should be successfully deleted
:CaseImportance: Critical
"""
rule = self._make_discoveryrule()
DiscoveryRule.delete({u'id': rule['id']})
with self.assertRaises(CLIReturnCodeError):
DiscoveryRule.info({u'id': rule['id']})