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

Side by Side Diff: appengine/findit/common/test/dependency_test.py

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: reordering imports Created 4 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 common.dependency import Dependency 7 from common.dependency import Dependency, DependencyRoll
8 from common.dependency import DependencyRoll
9 8
10 9
11 class DependencyTest(unittest.TestCase): 10 class DependencyTest(unittest.TestCase):
12 def testParentChild(self): 11 def testParentChild(self):
13 parent = Dependency( 12 parent = Dependency(
14 'a/', 'https://cr.googlesource.com/cr/a.git', '12a', 'DEPS') 13 'a/', 'https://cr.googlesource.com/cr/a.git', '12a', 'DEPS')
15 child = Dependency( 14 child = Dependency(
16 'a/b/', 'https://cr.googlesource.com/cr/b.git', '12b', 'DEPS') 15 'a/b/', 'https://cr.googlesource.com/cr/b.git', '12b', 'DEPS')
17 16
18 child.SetParent(parent) 17 child.SetParent(parent)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 'third_party/dep/', 'https://cr.googlesource.com/cr/dep.git', 59 'third_party/dep/', 'https://cr.googlesource.com/cr/dep.git',
61 'rev1', 'rev2') 60 'rev1', 'rev2')
62 expected_dep_roll_dict = { 61 expected_dep_roll_dict = {
63 'path': 'third_party/dep/', 62 'path': 'third_party/dep/',
64 'repo_url': 'https://cr.googlesource.com/cr/dep.git', 63 'repo_url': 'https://cr.googlesource.com/cr/dep.git',
65 'old_revision': 'rev1', 64 'old_revision': 'rev1',
66 'new_revision': 'rev2', 65 'new_revision': 'rev2',
67 } 66 }
68 67
69 self.assertEqual(expected_dep_roll_dict, dep_roll.ToDict()) 68 self.assertEqual(expected_dep_roll_dict, dep_roll.ToDict())
OLDNEW
« no previous file with comments | « appengine/findit/common/test/chrome_dependency_fetcher_test.py ('k') | appengine/findit/common/test/diff_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698