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

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

Issue 1861373003: [Findit] Initial code of findit for crash. Add scorers to apply heuristic rules. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix nits and rebase Created 4 years, 8 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/common/dependency.py ('k') | appengine/findit/crash/crash_util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/common/test/chromium_deps_test.py
diff --git a/appengine/findit/common/test/chromium_deps_test.py b/appengine/findit/common/test/chromium_deps_test.py
index 674803d27d71c367649ce036eb461b0b246a9be3..f77d270b9bcb9f4fcc89d8117bbda7d19daeacf5 100644
--- a/appengine/findit/common/test/chromium_deps_test.py
+++ b/appengine/findit/common/test/chromium_deps_test.py
@@ -10,7 +10,7 @@ from common import chromium_deps
from common import deps_parser
from common import git_repository
from common import repository
-from common.dependency import Dependency
+from common.dependency import Dependency, DependencyRoll
class DummyGitRepository(repository.Repository):
@@ -172,3 +172,25 @@ class ChromiumDEPSTest(testing.AppengineTestCase):
deps_rolls = chromium_deps.GetChromiumDEPSRolls('rev1', 'rev2', 'unix')
self.assertEqual(expected_deps_rolls,
[roll.ToDict() for roll in deps_rolls])
+
+ def testGetDEPSRollsDict(self):
+ def _MockGetChromiumDEPSRolls(*_):
+ return [
+ DependencyRoll('src/dep1', 'https://url_dep1', '7', '9'),
+ DependencyRoll('src/dep2', 'https://url_dep2', '3', None)
+ ]
+
+ self.mock(chromium_deps, 'GetChromiumDEPSRolls',
+ _MockGetChromiumDEPSRolls)
+
+ expected_deps_rolls_dict = {
+ 'src/dep1': DependencyRoll('src/dep1', 'https://url_dep1', '7', '9'),
+ 'src/dep2': DependencyRoll('src/dep2', 'https://url_dep2', '3', None),
+ 'src/': DependencyRoll(
+ 'src/',
+ 'https://chromium.googlesource.com/chromium/src.git', '4', '5'),
+ }
+
+ self.assertEqual(chromium_deps.GetDEPSRollsDict('4', '5', 'all'),
+ expected_deps_rolls_dict)
+
« no previous file with comments | « appengine/findit/common/dependency.py ('k') | appengine/findit/crash/crash_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698