| 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 from gae_libs.testcase import TestCase | 5 from gae_libs.testcase import TestCase |
| 6 | 6 |
| 7 from model.flake.flake_try_job import FlakeTryJob | 7 from model.flake.flake_try_job import FlakeTryJob |
| 8 | 8 |
| 9 | 9 |
| 10 class FlakeTryJobTest(TestCase): | 10 class FlakeTryJobTest(TestCase): |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 try_job_id = 'try_job_id' | 23 try_job_id = 'try_job_id' |
| 24 | 24 |
| 25 try_job_before = FlakeTryJob.Create( | 25 try_job_before = FlakeTryJob.Create( |
| 26 master_name, builder_name, step_name, test_name, git_hash) | 26 master_name, builder_name, step_name, test_name, git_hash) |
| 27 try_job_before.try_job_ids = [try_job_id] | 27 try_job_before.try_job_ids = [try_job_id] |
| 28 try_job_before.put() | 28 try_job_before.put() |
| 29 | 29 |
| 30 try_job_after = FlakeTryJob.Get( | 30 try_job_after = FlakeTryJob.Get( |
| 31 master_name, builder_name, step_name, test_name, git_hash) | 31 master_name, builder_name, step_name, test_name, git_hash) |
| 32 self.assertEqual([try_job_id], try_job_after.try_job_ids) | 32 self.assertEqual([try_job_id], try_job_after.try_job_ids) |
| 33 |
| 34 def testProperties(self): |
| 35 master_name = 'm' |
| 36 builder_name = 'b' |
| 37 step_name = 's' |
| 38 test_name = 't' |
| 39 git_hash = 'a1b2c3' |
| 40 |
| 41 try_job = FlakeTryJob.Create( |
| 42 master_name, builder_name, step_name, test_name, git_hash) |
| 43 self.assertEqual(master_name, try_job.master_name) |
| 44 self.assertEqual(builder_name, try_job.builder_name) |
| 45 self.assertEqual(step_name, try_job.step_name) |
| 46 self.assertEqual(test_name, try_job.test_name) |
| 47 self.assertEqual(git_hash, try_job.git_hash) |
| OLD | NEW |