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

Side by Side Diff: tests/git_cl_test.py

Issue 9969099: Allow overriding base-url in git-cl. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« git_cl.py ('K') | « 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 ((['git', 'config', 'user.email'],), 'me@example.com'), 116 ((['git', 'config', 'user.email'],), 'me@example.com'),
117 ((['git', 'diff', '--no-ext-diff', '--stat', '-M', 'master...'],), 117 ((['git', 'diff', '--no-ext-diff', '--stat', '-M', 'master...'],),
118 '+dat'), 118 '+dat'),
119 ((['git', 'log', '--pretty=format:%s\n\n%b', 'master..'],), 'desc\n'), 119 ((['git', 'log', '--pretty=format:%s\n\n%b', 'master..'],), 'desc\n'),
120 ] 120 ]
121 121
122 @staticmethod 122 @staticmethod
123 def _git_upload_calls(): 123 def _git_upload_calls():
124 return [ 124 return [
125 ((['git', 'config', 'rietveld.cc'],), ''), 125 ((['git', 'config', 'rietveld.cc'],), ''),
126 ((['git', 'config', 'branch.master.base-url'],), ''),
126 ((['git', 'config', '--get-regexp', '^svn-remote\\.'],), 127 ((['git', 'config', '--get-regexp', '^svn-remote\\.'],),
127 (('', None), 0)), 128 (('', None), 0)),
128 ((['git', 'rev-parse', '--show-cdup'],), ''), 129 ((['git', 'rev-parse', '--show-cdup'],), ''),
129 ((['git', 'svn', 'info'],), ''), 130 ((['git', 'svn', 'info'],), ''),
130 ((['git', 'config', 'branch.master.rietveldissue', '1'],), ''), 131 ((['git', 'config', 'branch.master.rietveldissue', '1'],), ''),
131 ((['git', 'config', 'branch.master.rietveldserver', 132 ((['git', 'config', 'branch.master.rietveldserver',
132 'https://codereview.example.com'],), ''), 133 'https://codereview.example.com'],), ''),
133 ((['git', 'config', 'branch.master.rietveldpatchset', '2'],), ''), 134 ((['git', 'config', 'branch.master.rietveldpatchset', '2'],), ''),
134 ] 135 ]
135 136
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 ((['git', 'config', 'rietveld.viewvc-url'],), ''), 450 ((['git', 'config', 'rietveld.viewvc-url'],), ''),
450 (('ViewVC URL:',), ''), 451 (('ViewVC URL:',), ''),
451 # DownloadHooks(True) 452 # DownloadHooks(True)
452 (('/usr/local/src/.git/hooks/commit-msg', os.X_OK,), True), 453 (('/usr/local/src/.git/hooks/commit-msg', os.X_OK,), True),
453 ] 454 ]
454 git_cl.main(['config']) 455 git_cl.main(['config'])
455 456
456 457
457 if __name__ == '__main__': 458 if __name__ == '__main__':
458 unittest.main() 459 unittest.main()
OLDNEW
« git_cl.py ('K') | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698