本文整理汇总了Python中treeherder.client.TreeherderClient.get_resultsets方法的典型用法代码示例。如果您正苦于以下问题:Python TreeherderClient.get_resultsets方法的具体用法?Python TreeherderClient.get_resultsets怎么用?Python TreeherderClient.get_resultsets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类treeherder.client.TreeherderClient
的用法示例。
在下文中一共展示了TreeherderClient.get_resultsets方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_results
# 需要导入模块: from treeherder.client import TreeherderClient [as 别名]
# 或者: from treeherder.client.TreeherderClient import get_resultsets [as 别名]
def test_get_results(self):
tdc = TreeherderClient()
url = tdc._get_project_uri("mozilla-inbound", tdc.RESULTSET_ENDPOINT)
content = {"meta": {"count": 3, "repository": "mozilla-inbound", "offset": 0}, "results": self.RESULTSETS}
responses.add(responses.GET, url, json=content, match_querystring=True, status=200)
resultsets = tdc.get_resultsets("mozilla-inbound")
self.assertEqual(len(resultsets), 3)
self.assertEqual(resultsets, self.RESULTSETS)
示例2: test_get_results
# 需要导入模块: from treeherder.client import TreeherderClient [as 别名]
# 或者: from treeherder.client.TreeherderClient import get_resultsets [as 别名]
def test_get_results(self, mock_get):
mock_get.return_value = self._get_mock_response({
"meta": {"count": 3, "repository": "mozilla-inbound",
"offset": 0},
"results": self.RESULTSETS})
tdc = TreeherderClient()
resultsets = tdc.get_resultsets("mozilla-inbound")
self.assertEqual(len(resultsets), 3)
self.assertEqual(resultsets, self.RESULTSETS)