Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Side by Side Diff: appengine/findit/model/flake/test/flake_try_job_test.py

Issue 2605803002: [Findit] Refactoring WfTryJobData into BaseTryJobData, WfTryJobData, and FlakeTryJobData (Closed)
Patch Set: Fixing code coverage Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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)
OLDNEW
« no previous file with comments | « appengine/findit/model/flake/test/flake_try_job_data_test.py ('k') | appengine/findit/model/test/base_try_job_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698