本文整理汇总了Python中pyral.Rally.search方法的典型用法代码示例。如果您正苦于以下问题:Python Rally.search方法的具体用法?Python Rally.search怎么用?Python Rally.search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyral.Rally
的用法示例。
在下文中一共展示了Rally.search方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_basic_search
# 需要导入模块: from pyral import Rally [as 别名]
# 或者: from pyral.Rally import search [as 别名]
def test_basic_search():
"""
Using a known valid Rally server and known valid access credentials,
issue a simple search query (basic qualifying criteria).
"""
rally = Rally(apikey=APIKEY, workspace=WORKSPACE, project=PROJECT)
#
#expectedErrMsg = u'The new search functionality is not turned on for your subscription'
#
#with py.test.raises(RallyRESTAPIError) as excinfo:
# response = rally.search('wombat', limit=10)
# actualErrVerbiage = excinfo.value.args[0]
# assert excinfo.value.__class__.__name__ == 'RallyRESTAPIError'
# assert expectedErrMsg in actualErrVerbiage
response = rally.search('bogus', limit=10)
assert response.status_code == 200
assert response.errors == []
assert response.warnings == []
assert response.resultCount > 0
print(response.resultCount)
for entry in response:
print(entry.ObjectID, entry.FormattedID, entry.Name)