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

Unified Diff: tests/trychange_unittest.py

Issue 1739021: Modify scm.GIT.GetUpstreamBranch to behave like git-cl. (Closed)
Patch Set: Created 10 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 | « tests/scm_unittest.py ('k') | trychange.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/trychange_unittest.py
diff --git a/tests/trychange_unittest.py b/tests/trychange_unittest.py
index a41b452adf94b7ede59f0cfad0c34ffa3c439c12..9f2c5a65ac76d3571082c499a231eb7d9206db55 100755
--- a/tests/trychange_unittest.py
+++ b/tests/trychange_unittest.py
@@ -19,8 +19,9 @@ class TryChangeTestsBase(SuperMoxTestBase):
self.mox.StubOutWithMock(trychange.scm.GIT, 'Capture')
self.mox.StubOutWithMock(trychange.scm.GIT, 'GenerateDiff')
self.mox.StubOutWithMock(trychange.scm.GIT, 'GetCheckoutRoot')
- self.mox.StubOutWithMock(trychange.scm.GIT, 'GetPatchName')
self.mox.StubOutWithMock(trychange.scm.GIT, 'GetEmail')
+ self.mox.StubOutWithMock(trychange.scm.GIT, 'GetPatchName')
+ self.mox.StubOutWithMock(trychange.scm.GIT, 'GetUpstreamBranch')
self.mox.StubOutWithMock(trychange.scm.SVN, 'DiffItem')
self.mox.StubOutWithMock(trychange.scm.SVN, 'GenerateDiff')
self.mox.StubOutWithMock(trychange.scm.SVN, 'GetCheckoutRoot')
@@ -88,10 +89,11 @@ class GITUnittest(TryChangeTestsBase):
def testBasic(self):
trychange.scm.GIT.GetCheckoutRoot(self.fake_root).AndReturn(self.fake_root)
+ trychange.scm.GIT.GetUpstreamBranch(self.fake_root).AndReturn('somewhere')
trychange.scm.GIT.GenerateDiff(self.fake_root,
full_move=True,
files=['foo.txt', 'bar.txt'],
- branch=None).AndReturn('A diff')
+ branch='somewhere').AndReturn('A diff')
trychange.scm.GIT.GetPatchName(self.fake_root).AndReturn('bleh-1233')
trychange.scm.GIT.GetEmail(self.fake_root).AndReturn('georges@example.com')
self.mox.ReplayAll()
« no previous file with comments | « tests/scm_unittest.py ('k') | trychange.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698