Xixuan Wu | 865fa28 | 2017-09-05 15:23:19 -0700 | [diff] [blame^] | 1 | # Copyright 2017 The Chromium OS Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | """Module for tests for handlers.""" |
| 6 | |
| 7 | import swarming_lib |
| 8 | |
| 9 | import webapp2 |
| 10 | |
| 11 | |
| 12 | class TestSwarmingAPI(webapp2.RequestHandler): |
| 13 | |
| 14 | def get(self): |
| 15 | swarming_runner = swarming_lib.SwarmingRunner() |
| 16 | response = swarming_runner.dummy_run() |
| 17 | swarming_task_info = swarming_runner.query_task(response['task_id']) |
| 18 | self.response.write(swarming_task_info.name) |
| 19 | |
| 20 | |
| 21 | app = webapp2.WSGIApplication([ |
| 22 | ('/test_push/swarming', TestSwarmingAPI), |
| 23 | ], debug=True) |