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

Unified Diff: tests/gcl_unittest.py

Issue 6696010: Modify gcl to use suggested_reviewer output from presubmit_support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: update w/ review feedback Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gcl_unittest.py
diff --git a/tests/gcl_unittest.py b/tests/gcl_unittest.py
index c532a4e913718c400854d9d5273eb41f69b9c2d0..a88d9766f715c23e23ade699358bcd8b7e10933b 100755
--- a/tests/gcl_unittest.py
+++ b/tests/gcl_unittest.py
@@ -12,6 +12,7 @@
from super_mox import mox, SuperMoxTestBase
import gcl
+import presubmit_support
class GclTestsBase(SuperMoxTestBase):
@@ -56,13 +57,14 @@ class GclUnittest(GclTestsBase):
'GetCodeReviewSetting', 'GetEditor', 'GetFilesNotInCL', 'GetInfoDir',
'GetModifiedFiles', 'GetRepositoryRoot', 'ListFiles',
'LoadChangelistInfoForMultiple', 'MISSING_TEST_MSG',
- 'OptionallyDoPresubmitChecks', 'REPOSITORY_ROOT',
+ 'OptionallyDoPresubmitChecks', 'REPOSITORY_ROOT', 'REVIEWERS_REGEX',
'RunShell', 'RunShellWithReturnCode', 'SVN',
'TryChange', 'UnknownFiles', 'Warn',
'attrs', 'breakpad', 'defer_attributes', 'gclient_utils', 'getpass',
'json', 'main', 'need_change', 'need_change_and_args', 'no_args',
- 'optparse', 'os', 'random', 're', 'string', 'subprocess', 'sys',
- 'tempfile', 'time', 'upload', 'urllib2',
+ 'optparse', 'os', 'owners', 'presubmit_support', 'random', 're',
+ 'string', 'subprocess', 'suggest_reviewers', 'sys', 'tempfile', 'time',
+ 'upload', 'urllib2',
]
# If this test fails, you should add the relevant test.
self.compareMembers(gcl, members)
@@ -149,7 +151,8 @@ class ChangeInfoUnittest(GclTestsBase):
'NeedsUpload', 'PrimeLint', 'Save', 'SendToRietveld',
'UpdateRietveldDescription',
'description', 'issue', 'name',
- 'needs_upload', 'patch', 'patchset', 'rietveld',
+ 'needs_upload', 'patch', 'patchset', 'reviewers', 'rietveld',
+ 'subject'
]
# If this test fails, you should add the relevant test.
self.compareMembers(
@@ -258,7 +261,8 @@ class CMDuploadUnittest(GclTestsBase):
change_info.patch = None
change_info.rietveld = 'my_server'
files = [item[1] for item in change_info.files]
- gcl.DoPresubmitChecks(change_info, False, True).AndReturn(True)
+ output = presubmit_support.PresubmitOutput()
+ gcl.DoPresubmitChecks(change_info, False, True).AndReturn(output)
#gcl.GetCodeReviewSetting('CODE_REVIEW_SERVER').AndReturn('my_server')
gcl.os.getcwd().AndReturn('somewhere')
change_info.GetFiles().AndReturn(change_info.files)
@@ -293,7 +297,8 @@ class CMDuploadUnittest(GclTestsBase):
self.fake_root_dir, 'my_server')
self.mox.StubOutWithMock(change_info, 'Save')
change_info.Save()
- gcl.DoPresubmitChecks(change_info, False, True).AndReturn(True)
+ output = presubmit_support.PresubmitOutput()
+ gcl.DoPresubmitChecks(change_info, False, True).AndReturn(output)
gcl.tempfile.mkstemp(text=True).AndReturn((42, 'descfile'))
gcl.os.write(42, change_info.description)
gcl.os.close(42)
@@ -327,7 +332,8 @@ class CMDuploadUnittest(GclTestsBase):
self.fake_root_dir, 'my_server')
self.mox.StubOutWithMock(change_info, 'Save')
change_info.Save()
- gcl.DoPresubmitChecks(change_info, False, True).AndReturn(True)
+ output = presubmit_support.PresubmitOutput()
+ gcl.DoPresubmitChecks(change_info, False, True).AndReturn(output)
gcl.tempfile.mkstemp(text=True).AndReturn((42, 'descfile'))
gcl.os.write(42, change_info.description)
gcl.os.close(42)
« no previous file with comments | « gcl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698