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

Unified Diff: tests/gcl_unittest.py

Issue 12276007: Add patchset number on manual commit comment. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fix nits Created 7 years, 10 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 | « git_cl.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 91c7aeb938e4973bc4be7cfc5ecd889205dfa2ae..77cc56fb225e0ebeb224b7c8c3dff8215a28a7e6 100755
--- a/tests/gcl_unittest.py
+++ b/tests/gcl_unittest.py
@@ -37,7 +37,7 @@ class GclTestsBase(SuperMoxTestBase):
def tearDown(self):
gcl.CODEREVIEW_SETTINGS = self.old_review_settings
- def fakeChange(self, files=None):
+ def fakeChange(self, files=None): # pylint: disable=R0201
if files == None:
files = [('A', 'aa'), ('M', 'bb')]
@@ -58,6 +58,11 @@ class GclTestsBase(SuperMoxTestBase):
change_info._deleted = False
change_info._comments_added = []
+ class RpcServer(object):
+ def get_issue_properties(self, *_): # pylint: disable=R0201
+ return { 'patchsets': [1337] }
+ change_info.RpcServer = RpcServer
+
def AddComment(comment):
# pylint: disable=W0212
change_info._comments_added.append(comment)
@@ -595,7 +600,7 @@ class CMDCommitUnittest(GclTestsBase):
self.assertTrue(change_info._closed)
self.assertEqual(
change_info._comments_added,
- ["Committed manually as r12345 (presubmit successful)."])
+ ["Committed patchset #1 manually as r12345 (presubmit successful)."])
if __name__ == '__main__':
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698