本文整理汇总了Python中pyral.Rally.deleteAttachment方法的典型用法代码示例。如果您正苦于以下问题:Python Rally.deleteAttachment方法的具体用法?Python Rally.deleteAttachment怎么用?Python Rally.deleteAttachment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyral.Rally
的用法示例。
在下文中一共展示了Rally.deleteAttachment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: x_test_detach_attachment
# 需要导入模块: from pyral import Rally [as 别名]
# 或者: from pyral.Rally import deleteAttachment [as 别名]
def x_test_detach_attachment():
"""
"""
rally = Rally(server=TRIAL, user=TRIAL_USER, password=TRIAL_PSWD)
candidate_story = "S78"
target = 'FormattedID = "%s"' % candidate_story
response = rally.get("UserStory", fetch=True, query=target, project=None)
assert response.resultCount == 1
story = response.next()
assert len(story.Attachments) == 1
attachment = story.Attachments[0]
expected_attachment_name = "Addendum.txt"
assert attachment.Name == expected_attachment_name
result = rally.deleteAttachment(story, expected_attachment_name)
assert result != False
assert len(result.Attachments) == (len(story.Attachments) - 1)
示例2: test_detach_attachment
# 需要导入模块: from pyral import Rally [as 别名]
# 或者: from pyral.Rally import deleteAttachment [as 别名]
def test_detach_attachment():
"""
This is the counterpart test for test_add_attachment
"""
rally = Rally(server=AGICEN, user=AGICEN_USER, password=AGICEN_PSWD)
candidate_story = "US1" # "US96"
target = 'FormattedID = "%s"' % candidate_story
response = rally.get("UserStory", fetch=True, query=target, project=None)
assert response.resultCount == 1
story = response.next()
assert len(story.Attachments) == 1
attachment = story.Attachments[0]
expected_attachment_name = "Addendum.txt"
assert attachment.Name == expected_attachment_name
result = rally.deleteAttachment(story, expected_attachment_name)
assert result != False
assert len(result.Attachments) == (len(story.Attachments) - 1)