| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 import unittest | 5 import unittest |
| 6 | 6 |
| 7 from model import analysis_status | 7 from model import analysis_status |
| 8 from model.wf_try_job import WfTryJob | 8 from model.wf_try_job import WfTryJob |
| 9 | 9 |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 try_job = WfTryJob.Create('m', 'b', 123) | 26 try_job = WfTryJob.Create('m', 'b', 123) |
| 27 try_job.status = analysis_status.ERROR | 27 try_job.status = analysis_status.ERROR |
| 28 self.assertTrue(try_job.failed) | 28 self.assertTrue(try_job.failed) |
| 29 | 29 |
| 30 def testTryJobStatusIsNotFailed(self): | 30 def testTryJobStatusIsNotFailed(self): |
| 31 for status in (analysis_status.PENDING, analysis_status.RUNNING, | 31 for status in (analysis_status.PENDING, analysis_status.RUNNING, |
| 32 analysis_status.COMPLETED): | 32 analysis_status.COMPLETED): |
| 33 try_job = WfTryJob.Create('m', 'b', 123) | 33 try_job = WfTryJob.Create('m', 'b', 123) |
| 34 try_job.status = status | 34 try_job.status = status |
| 35 self.assertFalse(try_job.failed) | 35 self.assertFalse(try_job.failed) |
| 36 |
| 37 def testProperties(self): |
| 38 master_name = 'm' |
| 39 builder_name = 'b' |
| 40 try_job = WfTryJob.Create(master_name, builder_name, 123) |
| 41 |
| 42 self.assertEqual(master_name, try_job.master_name) |
| 43 self.assertEqual(builder_name, try_job.builder_name) |
| OLD | NEW |