コード例 #1
0
 def test_cancel_task(self):
     self.json_response = {'ok': True}
     swarming.cancel_task('swarming.example.com', 'deadbeef')
     net.json_request_async.assert_called_with(
         ('https://swarming.example.com/'
          '_ah/api/swarming/v1/task/deadbeef/cancel'),
         method='POST',
         scopes=net.EMAIL_SCOPE,
         delegation_token=None,
         payload={'kill_running': True},
         deadline=None,
         max_attempts=None,
     )
コード例 #2
0
 def test_cancel_running_task(self):
     self.json_response = {
         'was_running': True,
         'ok': False,
     }
     swarming.cancel_task('swarming.example.com', 'deadbeef')
コード例 #3
0
 def post(self, host, task_id):
   swarming.cancel_task(host, task_id)