| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from datetime import datetime | 5 from datetime import datetime |
| 6 import json | 6 import json |
| 7 import mock | 7 import mock |
| 8 import time | 8 import time |
| 9 | 9 |
| 10 from common.waterfall import buildbucket_client | 10 from common.waterfall import buildbucket_client |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 } | 471 } |
| 472 | 472 |
| 473 expected_error_dict = { | 473 expected_error_dict = { |
| 474 'message': 'No result report was found.', | 474 'message': 'No result report was found.', |
| 475 'reason': MonitorTryJobPipeline.UNKNOWN | 475 'reason': MonitorTryJobPipeline.UNKNOWN |
| 476 } | 476 } |
| 477 | 477 |
| 478 self.assertEqual( | 478 self.assertEqual( |
| 479 monitor_try_job_pipeline._GetError(build_response, None, False), | 479 monitor_try_job_pipeline._GetError(build_response, None, False), |
| 480 (expected_error_dict, try_job_error.UNKNOWN)) | 480 (expected_error_dict, try_job_error.UNKNOWN)) |
| 481 |
| 482 def testReturnNoneIfNoTryJobId(self): |
| 483 master_name = 'm' |
| 484 builder_name = 'b' |
| 485 build_number = 1 |
| 486 pipeline = MonitorTryJobPipeline() |
| 487 test_result = pipeline.run( |
| 488 master_name, builder_name, build_number, failure_type.TEST, |
| 489 None) |
| 490 self.assertIsNone(test_result) |
| OLD | NEW |