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

Unified Diff: tests/git_cl_test.py

Issue 104043008: Added --(de)activate-update options (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Style fixes Created 6 years, 12 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 | « git_cl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_cl_test.py
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 0cd6fea6f2650fe0b6e65c7e7ffb17a5c506ab7e..98ae5862d9f61d6e9d6e03bf16366b7ebe44a208 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -146,6 +146,7 @@ class TestGitCl(TestCase):
'-M'+similarity, 'fake_ancestor_sha', 'HEAD'],), '+dat')
return [
+ ((['git', 'config', 'rietveld.autoupdate'],), ''),
((['git', 'config', 'rietveld.server'],),
'codereview.example.com'),
((['git', 'symbolic-ref', 'HEAD'],), 'master'),
@@ -250,6 +251,8 @@ class TestGitCl(TestCase):
'svn-remote.svn.fetch trunk/src:refs/remotes/origin/master'),
None),
0)),
+ ((['git', 'config', 'rietveld.autoupdate'],),
+ ''),
((['git',
'config', 'rietveld.server'],), 'codereview.example.com'),
((['git', 'symbolic-ref', 'HEAD'],), 'refs/heads/working'),
@@ -382,6 +385,7 @@ class TestGitCl(TestCase):
private = '--private' in upload_args
self.calls = self._upload_calls(similarity, find_copies, private)
+
def RunEditor(desc, _, **kwargs):
self.assertEquals(
'# Enter a description of the change.\n'
@@ -393,12 +397,14 @@ class TestGitCl(TestCase):
desc)
return returned_description
self.mock(git_cl.gclient_utils, 'RunEditor', RunEditor)
+
def check_upload(args):
cmd_line = self._cmd_line(final_description, reviewers, similarity,
find_copies, private)
self.assertEquals(cmd_line, args)
return 1, 2
self.mock(git_cl.upload, 'RealMain', check_upload)
+
git_cl.main(['upload'] + upload_args)
def test_no_reviewer(self):
@@ -515,6 +521,8 @@ 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'),
@@ -651,6 +659,8 @@ class TestGitCl(TestCase):
self.mock(git_cl, 'urlretrieve', self._mocked_call)
self.mock(git_cl, 'hasSheBang', self._mocked_call)
self.calls = [
+ ((['git', 'config', 'rietveld.autoupdate'],),
+ ''),
((['git', 'config', 'rietveld.server',
'gerrit.chromium.org'],), ''),
((['git', 'config', '--unset-all', 'rietveld.cc'],), ''),
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698