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