Index: tests/git_cl_test.py |
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py |
index b034480afc1d28e2638a5ad9604f88df0ce45547..ea434044c41554e9093e234d0893930a07c7956e 100755 |
--- a/tests/git_cl_test.py |
+++ b/tests/git_cl_test.py |
@@ -163,19 +163,22 @@ class TestGitCl(TestCase): |
'-M'+similarity, 'fake_ancestor_sha', 'HEAD'],), '+dat') |
return [ |
- ((['git', 'config', 'rietveld.autoupdate'],), ''), |
- ((['git', 'config', 'rietveld.server'],), |
- 'codereview.example.com'), |
+ #((['git', 'config', 'rietveld.autoupdate'],), ''), |
+ #((['git', 'config', 'rietveld.server'],), |
+ # 'codereview.example.com'), |
((['git', 'symbolic-ref', 'HEAD'],), 'master'), |
similarity_call, |
((['git', 'symbolic-ref', 'HEAD'],), 'master'), |
find_copies_call, |
+ ((['git', 'config', 'rietveld.autoupdate'],), ''), |
+ ((['git', 'config', 'gerrit.host'],), ''), |
+ ((['git', 'config', 'rietveld.server'],), |
+ 'codereview.example.com'), |
((['git', 'symbolic-ref', 'HEAD'],), 'master'), |
((['git', 'config', 'branch.master.merge'],), 'master'), |
((['git', 'config', 'branch.master.remote'],), 'origin'), |
((['get_or_create_merge_base', 'master', 'master'],), |
'fake_ancestor_sha'), |
- ((['git', 'config', 'gerrit.host'],), ''), |
((['git', 'config', 'branch.master.rietveldissue'],), ''), |
] + cls._git_sanity_checks('fake_ancestor_sha', 'master') + [ |
((['git', 'rev-parse', '--show-cdup'],), ''), |
@@ -279,16 +282,18 @@ class TestGitCl(TestCase): |
'svn-remote.svn.fetch trunk/src:refs/remotes/origin/master'), |
None), |
0)), |
- ((['git', |
- 'config', 'rietveld.server'],), 'codereview.example.com'), |
((['git', 'symbolic-ref', 'HEAD'],), 'refs/heads/working'), |
((['git', 'config', '--int', '--get', |
'branch.working.git-cl-similarity'],), ''), |
((['git', 'symbolic-ref', 'HEAD'],), 'refs/heads/working'), |
((['git', 'config', '--int', '--get', |
'branch.working.git-find-copies'],), ''), |
+ ((['git', |
+ 'config', 'rietveld.server'],), 'codereview.example.com'), |
((['git', 'symbolic-ref', 'HEAD'],), 'refs/heads/working'), |
((['git', |
+ 'config', 'branch.working.rietveldissue'],), '12345'), |
+ ((['git', |
'config', 'branch.working.merge'],), 'refs/heads/master'), |
((['git', 'config', 'branch.working.remote'],), 'origin'), |
((['git', 'config', 'branch.working.merge'],), |
@@ -321,9 +326,6 @@ class TestGitCl(TestCase): |
'diff', '--name-status', '--no-renames', '-r', 'fake_ancestor_sha...', |
'.'],), |
'M\tPRESUBMIT.py'), |
- ((['git', 'config', 'gerrit.host'],), ''), |
- ((['git', |
- 'config', 'branch.working.rietveldissue'],), '12345'), |
((['git', |
'config', 'branch.working.rietveldpatchset'],), '31137'), |
((['git', 'config', 'branch.working.rietveldserver'],), |
@@ -335,9 +337,6 @@ class TestGitCl(TestCase): |
@classmethod |
def _dcommit_calls_bypassed(cls): |
return [ |
- ((['git', 'config', 'gerrit.host'],), ''), |
- ((['git', |
- 'config', 'branch.working.rietveldissue'],), '12345'), |
((['git', 'config', 'branch.working.rietveldserver'],), |
'codereview.example.com'), |
] |
@@ -547,22 +546,25 @@ class TestGitCl(TestCase): |
@classmethod |
def _gerrit_base_calls(cls): |
return [ |
- ((['git', 'config', 'rietveld.autoupdate'],), |
- ''), |
- ((['git', |
- 'config', 'rietveld.server'],), 'codereview.example.com'), |
((['git', 'symbolic-ref', 'HEAD'],), 'master'), |
((['git', 'config', '--int', '--get', |
'branch.master.git-cl-similarity'],), ''), |
((['git', 'symbolic-ref', 'HEAD'],), 'master'), |
((['git', 'config', '--int', '--get', |
'branch.master.git-find-copies'],), ''), |
+ ((['git', 'config', 'rietveld.autoupdate'],), |
+ ''), |
+ ((['git', 'config', 'gerrit.host'],), 'True'), |
+ #((['git', |
+ # 'config', 'rietveld.server'],), 'codereview.example.com'), |
((['git', 'symbolic-ref', 'HEAD'],), 'master'), |
+ #((['git', |
+ # 'config', 'branch.master.rietveldissue'],), ''), |
((['git', 'config', 'branch.master.merge'],), 'master'), |
((['git', 'config', 'branch.master.remote'],), 'origin'), |
((['get_or_create_merge_base', 'master', 'master'],), |
'fake_ancestor_sha'), |
- ((['git', 'config', 'gerrit.host'],), 'True'), |
+ # ((['git', 'config', 'gerrit.host'],), 'True'), |
] + cls._git_sanity_checks('fake_ancestor_sha', 'master') + [ |
((['git', 'rev-parse', '--show-cdup'],), ''), |
((['git', 'rev-parse', 'HEAD'],), '12345'), |
@@ -572,7 +574,7 @@ class TestGitCl(TestCase): |
'M\t.gitignore\n'), |
((['git', 'config', 'branch.master.gerritissue'],), ''), |
((['git', |
- 'config', 'branch.master.rietveldpatchset'],), ''), |
+ 'config', 'branch.master.gerritpatchset'],), ''), |
((['git', |
'log', '--pretty=format:%s%n%n%b', 'fake_ancestor_sha...'],), |
'foo'), |
@@ -887,11 +889,11 @@ class TestGitCl(TestCase): |
self.assertNotEqual(git_cl.main(['diff']), 0) |
def _patch_common(self): |
- self.mock(git_cl.Changelist, 'GetMostRecentPatchset', lambda x: '60001') |
- self.mock(git_cl.Changelist, 'GetPatchSetDiff', lambda *args: None) |
- self.mock(git_cl.Changelist, 'GetDescription', lambda *args: 'Description') |
- self.mock(git_cl.Changelist, 'SetIssue', lambda *args: None) |
- self.mock(git_cl.Changelist, 'SetPatchset', lambda *args: None) |
+ self.mock(git_cl.RietveldChangelist, 'GetMostRecentPatchset', lambda x: '60001') |
+ self.mock(git_cl.RietveldChangelist, 'GetPatchSetDiff', lambda *args: None) |
+ self.mock(git_cl.ChangelistBase, 'GetDescription', lambda *args: 'Description') |
+ self.mock(git_cl.ChangelistBase, 'SetIssue', lambda *args: None) |
+ self.mock(git_cl.ChangelistBase, 'SetPatchset', lambda *args: None) |
self.mock(git_cl, 'IsGitVersionAtLeast', lambda *args: True) |
self.calls = [ |