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

Side by Side Diff: tests/git_cl_test.py

Issue 24257014: Ignore CC_LIST when private flag is specified. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Unit tests for git_cl.py.""" 6 """Unit tests for git_cl.py."""
7 7
8 import os 8 import os
9 import StringIO 9 import StringIO
10 import stat 10 import stat
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 @classmethod 182 @classmethod
183 def _git_upload_no_rev_calls(cls): 183 def _git_upload_no_rev_calls(cls):
184 return [ 184 return [
185 ((['git', 'config', 'core.editor'],), ''), 185 ((['git', 'config', 'core.editor'],), ''),
186 ] 186 ]
187 187
188 @classmethod 188 @classmethod
189 def _git_upload_calls(cls, private): 189 def _git_upload_calls(cls, private):
190 if private: 190 if private:
191 cc_call = []
191 private_call = [] 192 private_call = []
192 else: 193 else:
194 cc_call = [((['git', 'config', 'rietveld.cc'],), '')]
193 private_call = [ 195 private_call = [
194 ((['git', 'config', 'rietveld.private'],), '')] 196 ((['git', 'config', 'rietveld.private'],), '')]
195 197
196 return [ 198 return [
197 ((['git', 'config', 'core.editor'],), ''), 199 ((['git', 'config', 'core.editor'],), ''),
198 ((['git', 'config', 'rietveld.cc'],), '') 200 ] + cc_call + private_call + [
199 ] + private_call + [
200 ((['git', 'config', 'branch.master.base-url'],), ''), 201 ((['git', 'config', 'branch.master.base-url'],), ''),
201 ((['git', 202 ((['git',
202 'config', '--local', '--get-regexp', '^svn-remote\\.'],), 203 'config', '--local', '--get-regexp', '^svn-remote\\.'],),
203 (('', None), 0)), 204 (('', None), 0)),
204 ((['git', 'rev-parse', '--show-cdup'],), ''), 205 ((['git', 'rev-parse', '--show-cdup'],), ''),
205 ((['git', 'svn', 'info'],), ''), 206 ((['git', 'svn', 'info'],), ''),
206 ((['git', 207 ((['git',
207 'config', 'branch.master.rietveldissue', '1'],), ''), 208 'config', 'branch.master.rietveldissue', '1'],), ''),
208 ((['git', 'config', 'branch.master.rietveldserver', 209 ((['git', 'config', 'branch.master.rietveldserver',
209 'https://codereview.example.com'],), ''), 210 'https://codereview.example.com'],), ''),
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 obj = git_cl.ChangeDescription(orig) 718 obj = git_cl.ChangeDescription(orig)
718 obj.update_reviewers(reviewers) 719 obj.update_reviewers(reviewers)
719 actual.append(obj.description) 720 actual.append(obj.description)
720 self.assertEqual(expected, actual) 721 self.assertEqual(expected, actual)
721 722
722 723
723 if __name__ == '__main__': 724 if __name__ == '__main__':
724 git_cl.logging.basicConfig( 725 git_cl.logging.basicConfig(
725 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) 726 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR)
726 unittest.main() 727 unittest.main()
OLDNEW
« 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