| OLD | NEW |
| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 @classmethod | 148 @classmethod |
| 149 def _dcommit_calls_normal(cls): | 149 def _dcommit_calls_normal(cls): |
| 150 return [ | 150 return [ |
| 151 ((['git', 'rev-parse', '--show-cdup'],), ''), | 151 ((['git', 'rev-parse', '--show-cdup'],), ''), |
| 152 ((['git', 'rev-parse', 'HEAD'],), | 152 ((['git', 'rev-parse', 'HEAD'],), |
| 153 '00ff397798ea57439712ed7e04ab96e13969ef40'), | 153 '00ff397798ea57439712ed7e04ab96e13969ef40'), |
| 154 ((['git', 'diff', '--name-status', '-r', 'refs/remotes/origin/master...', | 154 ((['git', 'diff', '--name-status', '-r', 'refs/remotes/origin/master...', |
| 155 '.'],), | 155 '.'],), |
| 156 'M\tPRESUBMIT.py'), | 156 'M\tPRESUBMIT.py'), |
| 157 ((['git', 'config', 'branch.working.rietveldissue'],), '12345'), | 157 ((['git', 'config', 'branch.working.rietveldissue'],), '12345'), |
| 158 ((['git', 'config', 'branch.working.rietveldpatchset'],), '31137'), |
| 158 ((['git', 'config', 'branch.working.rietveldserver'],), | 159 ((['git', 'config', 'branch.working.rietveldserver'],), |
| 159 'codereview.example.com'), | 160 'codereview.example.com'), |
| 160 ((['git', 'config', 'branch.working.rietveldpatchset'],), '31137'), | |
| 161 ((['git', 'config', 'user.email'],), 'author@example.com'), | 161 ((['git', 'config', 'user.email'],), 'author@example.com'), |
| 162 ((['git', 'config', 'rietveld.tree-status-url'],), ''), | 162 ((['git', 'config', 'rietveld.tree-status-url'],), ''), |
| 163 ] | 163 ] |
| 164 | 164 |
| 165 @classmethod | 165 @classmethod |
| 166 def _dcommit_calls_bypassed(cls): | 166 def _dcommit_calls_bypassed(cls): |
| 167 return [ | 167 return [ |
| 168 ((['git', 'config', 'branch.working.rietveldissue'],), '12345'), | 168 ((['git', 'config', 'branch.working.rietveldissue'],), '12345'), |
| 169 ((['git', 'config', 'branch.working.rietveldserver'],), | 169 ((['git', 'config', 'branch.working.rietveldserver'],), |
| 170 'codereview.example.com'), | 170 'codereview.example.com'), |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 | 384 |
| 385 def test_gerrit_reviewer_multiple(self): | 385 def test_gerrit_reviewer_multiple(self): |
| 386 self._run_gerrit_reviewer_test( | 386 self._run_gerrit_reviewer_test( |
| 387 [], | 387 [], |
| 388 'desc\nTBR=reviewer@example.com\nBUG=\nR=another@example.com\n', | 388 'desc\nTBR=reviewer@example.com\nBUG=\nR=another@example.com\n', |
| 389 ['reviewer@example.com', 'another@example.com']) | 389 ['reviewer@example.com', 'another@example.com']) |
| 390 | 390 |
| 391 | 391 |
| 392 if __name__ == '__main__': | 392 if __name__ == '__main__': |
| 393 unittest.main() | 393 unittest.main() |
| OLD | NEW |