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

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

Issue 2586483003: [Findit] Adding build model for flake try jobs (Closed)
Patch Set: Fixing whitespace Created 4 years 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
(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)
OLDNEW
« no previous file with comments | « appengine/findit/model/flake/flake_try_job.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