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

Side by Side Diff: tests/git_cl_test.py

Issue 9193023: Update upload.py @827fa087f74d, which includes support for svn 1.7 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Don't try to fix push-from-logs.sh in this CL, defer for later Created 8 years, 11 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 | « tests/gcl_unittest.py ('k') | third_party/upload.py » ('j') | 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 sys 10 import sys
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 'Issue: 12345\n\nReview URL: https://codereview.example.com/12345'],), 194 'Issue: 12345\n\nReview URL: https://codereview.example.com/12345'],),
195 ''), 195 ''),
196 ((['git', 'svn', 'dcommit', '--no-rebase', '--rmdir'],), (('', None), 0)), 196 ((['git', 'svn', 'dcommit', '--no-rebase', '--rmdir'],), (('', None), 0)),
197 ((['git', 'checkout', '-q', 'working'],), ''), 197 ((['git', 'checkout', '-q', 'working'],), ''),
198 ((['git', 'branch', '-D', 'git-cl-commit'],), ''), 198 ((['git', 'branch', '-D', 'git-cl-commit'],), ''),
199 ] 199 ]
200 200
201 @staticmethod 201 @staticmethod
202 def _cmd_line(description, args): 202 def _cmd_line(description, args):
203 """Returns the upload command line passed to upload.RealMain().""" 203 """Returns the upload command line passed to upload.RealMain()."""
204 msg = description.split('\n', 1)[0]
205 return [ 204 return [
206 'upload', '--assume_yes', '--server', 205 'upload', '--assume_yes', '--server',
207 'https://codereview.example.com', 206 'https://codereview.example.com',
208 '--message', msg, 207 '--message', description
209 '--description', description
210 ] + args + [ 208 ] + args + [
211 '--cc', 'joe@example.com', 209 '--cc', 'joe@example.com',
212 'master...' 210 'master...'
213 ] 211 ]
214 212
215 def _run_reviewer_test( 213 def _run_reviewer_test(
216 self, 214 self,
217 upload_args, 215 upload_args,
218 expected_description, 216 expected_description,
219 returned_description, 217 returned_description,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 def test_dcommit_bypass_hooks(self): 314 def test_dcommit_bypass_hooks(self):
317 self.calls = ( 315 self.calls = (
318 self._dcommit_calls_1() + 316 self._dcommit_calls_1() +
319 self._dcommit_calls_bypassed() + 317 self._dcommit_calls_bypassed() +
320 self._dcommit_calls_3()) 318 self._dcommit_calls_3())
321 git_cl.main(['dcommit', '--bypass-hooks']) 319 git_cl.main(['dcommit', '--bypass-hooks'])
322 320
323 321
324 if __name__ == '__main__': 322 if __name__ == '__main__':
325 unittest.main() 323 unittest.main()
OLDNEW
« no previous file with comments | « tests/gcl_unittest.py ('k') | third_party/upload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698