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

Unified Diff: appengine/findit/model/test/base_build_model_test.py

Issue 820113002: [Findit] Add a sub-pipeline to detect first-known failure. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Address comments Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/findit/model/build_analysis.py ('k') | appengine/findit/model/test/build_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/model/test/base_build_model_test.py
diff --git a/appengine/findit/model/test/base_build_model_test.py b/appengine/findit/model/test/base_build_model_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..a443033f84c3483f73c468bd1bdf7e4feaf885de
--- /dev/null
+++ b/appengine/findit/model/test/base_build_model_test.py
@@ -0,0 +1,32 @@
+# Copyright 2014 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.
+
+import unittest
+
+from google.appengine.ext import ndb
+
+from model.base_build_model import BaseBuildModel
+
+
+class _DummyModel(BaseBuildModel):
+ @staticmethod
+ def Create(master_name, builder_name, build_number):
+ key = ndb.Key('M', BaseBuildModel.CreateBuildId(
+ master_name, builder_name, build_number),
+ '_DummyModel', build_number)
+ return _DummyModel(key=key)
+
+
+class BaseModelTest(unittest.TestCase):
+ def setUp(self):
+ self.dummy_model = _DummyModel.Create('master', 'builder', 1)
+
+ def testMasterName(self):
+ self.assertEqual('master', self.dummy_model.master_name)
+
+ def testBuilderName(self):
+ self.assertEqual('builder', self.dummy_model.builder_name)
+
+ def testBuildNumber(self):
+ self.assertEqual(1, self.dummy_model.build_number)
« no previous file with comments | « appengine/findit/model/build_analysis.py ('k') | appengine/findit/model/test/build_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698