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, )
def test_cancel_running_task(self): self.json_response = { 'was_running': True, 'ok': False, } swarming.cancel_task('swarming.example.com', 'deadbeef')
def post(self, host, task_id): swarming.cancel_task(host, task_id)