OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2009 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 gcl.py.""" | 6 """Unit tests for gcl.py.""" |
7 | 7 |
8 # Local imports | 8 # Local imports |
9 import gcl | 9 import gcl |
10 from super_mox import mox, SuperMoxTestBase | 10 from super_mox import mox, SuperMoxTestBase |
(...skipping 23 matching lines...) Expand all Loading... |
34 'DEFAULT_LINT_REGEX', 'DeleteEmptyChangeLists', 'DoPresubmitChecks', | 34 'DEFAULT_LINT_REGEX', 'DeleteEmptyChangeLists', 'DoPresubmitChecks', |
35 'ErrorExit', 'FILES_CACHE', 'FilterFlag', 'GenerateChangeName', | 35 'ErrorExit', 'FILES_CACHE', 'FilterFlag', 'GenerateChangeName', |
36 'GenerateDiff', 'GetCLs', 'GetCacheDir', 'GetCachedFile', | 36 'GenerateDiff', 'GetCLs', 'GetCacheDir', 'GetCachedFile', |
37 'GetChangelistInfoFile', 'GetChangesDir', 'GetCodeReviewSetting', | 37 'GetChangelistInfoFile', 'GetChangesDir', 'GetCodeReviewSetting', |
38 'GetEditor', 'GetFilesNotInCL', 'GetInfoDir', 'GetIssueDescription', | 38 'GetEditor', 'GetFilesNotInCL', 'GetInfoDir', 'GetIssueDescription', |
39 'GetModifiedFiles', 'GetRepositoryRoot', 'Help', 'Lint', | 39 'GetModifiedFiles', 'GetRepositoryRoot', 'Help', 'Lint', |
40 'LoadChangelistInfoForMultiple', 'MISSING_TEST_MSG', 'Opened', | 40 'LoadChangelistInfoForMultiple', 'MISSING_TEST_MSG', 'Opened', |
41 'OptionallyDoPresubmitChecks', 'PresubmitCL', 'REPOSITORY_ROOT', | 41 'OptionallyDoPresubmitChecks', 'PresubmitCL', 'REPOSITORY_ROOT', |
42 'ReadFile', 'RunShell', 'RunShellWithReturnCode', 'SVN', | 42 'ReadFile', 'RunShell', 'RunShellWithReturnCode', 'SVN', |
43 'SendToRietveld', 'TryChange', 'UnknownFiles', 'UploadCL', 'Warn', | 43 'SendToRietveld', 'TryChange', 'UnknownFiles', 'UploadCL', 'Warn', |
44 'WriteFile', 'gclient_utils', 'getpass', 'main', 'os', 'random', 're', | 44 'WriteFile', |
| 45 'breakpad', 'gclient_utils', 'getpass', 'main', 'os', 'random', 're', |
45 'shutil', 'string', 'subprocess', 'sys', 'tempfile', 'upload', | 46 'shutil', 'string', 'subprocess', 'sys', 'tempfile', 'upload', |
46 'urllib2', | 47 'urllib2', |
47 ] | 48 ] |
48 # If this test fails, you should add the relevant test. | 49 # If this test fails, you should add the relevant test. |
49 self.compareMembers(gcl, members) | 50 self.compareMembers(gcl, members) |
50 | 51 |
51 def testIsSVNMoved(self): | 52 def testIsSVNMoved(self): |
52 # TODO(maruel): TEST ME | 53 # TODO(maruel): TEST ME |
53 pass | 54 pass |
54 | 55 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 self.mox.ReplayAll() | 352 self.mox.ReplayAll() |
352 | 353 |
353 gcl.UploadCL(change_info, args) | 354 gcl.UploadCL(change_info, args) |
354 self.assertEquals(change_info.issue, 1) | 355 self.assertEquals(change_info.issue, 1) |
355 self.assertEquals(change_info.patchset, 2) | 356 self.assertEquals(change_info.patchset, 2) |
356 | 357 |
357 | 358 |
358 if __name__ == '__main__': | 359 if __name__ == '__main__': |
359 import unittest | 360 import unittest |
360 unittest.main() | 361 unittest.main() |
OLD | NEW |