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

Unified Diff: appengine/findit/common/test/dependency_test.py

Issue 1154593005: [Findit] Add a sub-pipeline to analyze failures caused by DEPS rolls. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Improve readability. Created 5 years, 7 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
Index: appengine/findit/common/test/dependency_test.py
diff --git a/appengine/findit/common/test/dependency_test.py b/appengine/findit/common/test/dependency_test.py
index cdaae681cf4bb6925648d4910fb97d6c0aab764c..c879f52b95910c2148d3d6689ef55c37c75f032d 100644
--- a/appengine/findit/common/test/dependency_test.py
+++ b/appengine/findit/common/test/dependency_test.py
@@ -5,6 +5,7 @@
import unittest
from common.dependency import Dependency
+from common.dependency import DependencyRoll
class DependencyTest(unittest.TestCase):
@@ -24,7 +25,7 @@ class DependencyTest(unittest.TestCase):
'a/', 'https://cr.googlesource.com/cr/a.git', '12a', 'DEPS')
sub_dep = Dependency(
'a/b/', 'https://cr.googlesource.com/cr/b.git', '12b', 'DEPS')
- expected_dep_tree_json = {
+ expected_dep_tree_dict = {
'path': 'a/',
'repo_url': 'https://cr.googlesource.com/cr/a.git',
'revision': '12a',
@@ -42,4 +43,19 @@ class DependencyTest(unittest.TestCase):
}
sub_dep.SetParent(root_dep)
- self.assertEqual(expected_dep_tree_json, root_dep.ToDict())
+ self.assertEqual(expected_dep_tree_dict, root_dep.ToDict())
+
+
+class DependencyRollTest(unittest.TestCase):
+ def testToDict(self):
+ dep_roll = DependencyRoll(
+ 'third_party/dep/', 'https://cr.googlesource.com/cr/dep.git',
+ 'rev1', 'rev2')
+ expected_dep_roll_dict = {
+ 'path': 'third_party/dep/',
+ 'repo_url': 'https://cr.googlesource.com/cr/dep.git',
+ 'old_revision': 'rev1',
+ 'new_revision': 'rev2',
+ }
+
+ self.assertEqual(expected_dep_roll_dict, dep_roll.ToDict())
« no previous file with comments | « appengine/findit/common/test/chromium_deps_test.py ('k') | appengine/findit/waterfall/analyze_build_failure_pipeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698