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

Side by Side Diff: appengine/findit/model/test/base_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
1 # Copyright 2015 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 import unittest 5 import unittest
6 6
7 from model import analysis_status 7 from model import analysis_status
8 from model.wf_try_job import WfTryJob 8 from model.wf_try_job import WfTryJob
9 9
10 10
11 class WfTryJobTest(unittest.TestCase): 11 class BaseTryJobTest(unittest.TestCase):
12 def testWfTryJobStatusIsCompleted(self): 12
13 def testTryJobStatusIsCompleted(self):
13 for status in (analysis_status.COMPLETED, analysis_status.ERROR): 14 for status in (analysis_status.COMPLETED, analysis_status.ERROR):
14 try_job = WfTryJob.Create('m', 'b', 123) 15 try_job = WfTryJob.Create('m', 'b', 123)
15 try_job.status = status 16 try_job.status = status
16 self.assertTrue(try_job.completed) 17 self.assertTrue(try_job.completed)
17 18
18 def testWfTryJobStatusIsNotCompleted(self): 19 def testTryJobStatusIsNotCompleted(self):
19 for status in (analysis_status.PENDING, analysis_status.RUNNING): 20 for status in (analysis_status.PENDING, analysis_status.RUNNING):
20 try_job = WfTryJob.Create('m', 'b', 123) 21 try_job = WfTryJob.Create('m', 'b', 123)
21 try_job.status = status 22 try_job.status = status
22 self.assertFalse(try_job.completed) 23 self.assertFalse(try_job.completed)
23 24
24 def testWfTryJobStatusIsFailed(self): 25 def testTryJobStatusIsFailed(self):
25 try_job = WfTryJob.Create('m', 'b', 123) 26 try_job = WfTryJob.Create('m', 'b', 123)
26 try_job.status = analysis_status.ERROR 27 try_job.status = analysis_status.ERROR
27 self.assertTrue(try_job.failed) 28 self.assertTrue(try_job.failed)
28 29
29 def testWfTryJobStatusIsNotFailed(self): 30 def testTryJobStatusIsNotFailed(self):
30 for status in (analysis_status.PENDING, analysis_status.RUNNING, 31 for status in (analysis_status.PENDING, analysis_status.RUNNING,
31 analysis_status.COMPLETED): 32 analysis_status.COMPLETED):
32 try_job = WfTryJob.Create('m', 'b', 123) 33 try_job = WfTryJob.Create('m', 'b', 123)
33 try_job.status = status 34 try_job.status = status
34 self.assertFalse(try_job.failed) 35 self.assertFalse(try_job.failed)
OLDNEW
« no previous file with comments | « appengine/findit/model/flake/test/flake_try_job_test.py ('k') | appengine/findit/model/test/wf_try_job_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698