| OLD | NEW |
| (Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 from gae_libs.testcase import TestCase |
| 6 |
| 7 from model.flake.flake_try_job import FlakeTryJob |
| 8 |
| 9 |
| 10 class FlakeTryJobTest(TestCase): |
| 11 |
| 12 def testCreate(self): |
| 13 try_job = FlakeTryJob.Create('m', 'b', 's', 't', 'a1b2c3') |
| 14 self.assertEqual([], try_job.try_job_ids) |
| 15 self.assertEqual([], try_job.flake_results) |
| 16 |
| 17 def testGet(self): |
| 18 master_name = 'm' |
| 19 builder_name = 'b' |
| 20 step_name = 's' |
| 21 test_name = 't' |
| 22 git_hash = 'a1b2c3' |
| 23 try_job_id = 'try_job_id' |
| 24 |
| 25 try_job_before = FlakeTryJob.Create( |
| 26 master_name, builder_name, step_name, test_name, git_hash) |
| 27 try_job_before.try_job_ids = [try_job_id] |
| 28 try_job_before.put() |
| 29 |
| 30 try_job_after = FlakeTryJob.Get( |
| 31 master_name, builder_name, step_name, test_name, git_hash) |
| 32 self.assertEqual([try_job_id], try_job_after.try_job_ids) |
| OLD | NEW |