| 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 import datetime | 5 import datetime |
| 6 | 6 |
| 7 from testing_utils import testing | 7 from testing_utils import testing |
| 8 | 8 |
| 9 from model.wf_build import WfBuild | 9 from model.wf_build import WfBuild |
| 10 from waterfall import build_util | 10 from waterfall import build_util |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 builder_name = 'b' | 177 builder_name = 'b' |
| 178 build_number = 123 | 178 build_number = 123 |
| 179 build = WfBuild.Create(master_name, builder_name, build_number) | 179 build = WfBuild.Create(master_name, builder_name, build_number) |
| 180 build.data = '{"times": [1467738821, %s]}' % end_time | 180 build.data = '{"times": [1467738821, %s]}' % end_time |
| 181 build.completed = True | 181 build.completed = True |
| 182 build.last_crawled_time = self._TimeBeforeNowBySeconds(10) | 182 build.last_crawled_time = self._TimeBeforeNowBySeconds(10) |
| 183 build.put() | 183 build.put() |
| 184 | 184 |
| 185 self.assertEqual(expected_time, | 185 self.assertEqual(expected_time, |
| 186 build_util.GetBuildEndTime( | 186 build_util.GetBuildEndTime( |
| 187 master_name, builder_name, build_number)) | 187 master_name, builder_name, build_number)) |
| OLD | NEW |