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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/model/flake/test/flake_try_job_test.py
diff --git a/appengine/findit/model/flake/test/flake_try_job_test.py b/appengine/findit/model/flake/test/flake_try_job_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..06c83dec1169fd0509179f1d22bb7d7a89d9e2b7
--- /dev/null
+++ b/appengine/findit/model/flake/test/flake_try_job_test.py
@@ -0,0 +1,32 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from gae_libs.testcase import TestCase
+
+from model.flake.flake_try_job import FlakeTryJob
+
+
+class FlakeTryJobTest(TestCase):
+
+ def testCreate(self):
+ try_job = FlakeTryJob.Create('m', 'b', 's', 't', 'a1b2c3')
+ self.assertEqual([], try_job.try_job_ids)
+ self.assertEqual([], try_job.flake_results)
+
+ def testGet(self):
+ master_name = 'm'
+ builder_name = 'b'
+ step_name = 's'
+ test_name = 't'
+ git_hash = 'a1b2c3'
+ try_job_id = 'try_job_id'
+
+ try_job_before = FlakeTryJob.Create(
+ master_name, builder_name, step_name, test_name, git_hash)
+ try_job_before.try_job_ids = [try_job_id]
+ try_job_before.put()
+
+ try_job_after = FlakeTryJob.Get(
+ master_name, builder_name, step_name, test_name, git_hash)
+ self.assertEqual([try_job_id], try_job_after.try_job_ids)
« 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