本文整理汇总了Python中pyral.Rally.delete方法的典型用法代码示例。如果您正苦于以下问题:Python Rally.delete方法的具体用法?Python Rally.delete怎么用?Python Rally.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyral.Rally
的用法示例。
在下文中一共展示了Rally.delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_delete_pull_request
# 需要导入模块: from pyral import Rally [as 别名]
# 或者: from pyral.Rally import delete [as 别名]
def test_delete_pull_request():
#rally = Rally(server=TESTN, user=TESTN_USER, password=TESTN_PSWD)
rally = Rally(server=AGICEN, apikey=AGICEN_SUB_100_API_KEY)
attrs = "ExternalId,ExternalFormattedId,Artifact,Name,Url,Description"
response = rally.get('PullRequest', fetch=attrs, project=None)
assert response.status_code == 200
assert len(response.errors) == 0
assert len(response.warnings) == 0
prs = [pr for pr in response]
assert len(prs) > 0
victim = prs[0]
result = rally.delete('PullRequest', victim.oid, project=None)
assert result == True
response = rally.get('PullRequest', fetch=attrs, query='ObjectID = %s' % victim.oid)
ghosts = [pr for pr in response]
assert not ghosts