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

Unified Diff: tests/gcl_unittest.py

Issue 12047089: Make gcl commit/git cl dcommit append a commit notification to rietveld. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Pull AddComment from git_cl.py Created 7 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 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 091daba31248961e4d2bc7bbf09d63445119b3db..91c7aeb938e4973bc4be7cfc5ecd889205dfa2ae 100755
--- a/tests/gcl_unittest.py
+++ b/tests/gcl_unittest.py
@@ -56,6 +56,12 @@ class GclTestsBase(SuperMoxTestBase):
change_info.reviewers = None
change_info._closed = False
change_info._deleted = False
+ change_info._comments_added = []
+
+ def AddComment(comment):
+ # pylint: disable=W0212
+ change_info._comments_added.append(comment)
+ change_info.AddComment = AddComment
def Delete():
change_info._deleted = True
@@ -180,9 +186,10 @@ class ChangeInfoUnittest(GclTestsBase):
def testChangeInfoMembers(self):
self.mox.ReplayAll()
members = [
- 'CloseIssue', 'Delete', 'Exists', 'GetFiles', 'GetFileNames',
- 'GetLocalRoot', 'GetIssueDescription', 'Load', 'MissingTests',
- 'NeedsUpload', 'PrimeLint', 'RpcServer', 'Save', 'SendToRietveld',
+ 'AddComment', 'CloseIssue', 'Delete', 'Exists', 'GetFiles',
+ 'GetFileNames', 'GetLocalRoot', 'GetIssueDescription', 'Load',
+ 'MissingTests', 'NeedsUpload', 'PrimeLint', 'RpcServer', 'Save',
+ 'SendToRietveld',
'SEPARATOR',
'UpdateRietveldDescription',
'description', 'issue', 'name',
@@ -586,6 +593,9 @@ class CMDCommitUnittest(GclTestsBase):
# pylint: disable=W0212
self.assertTrue(change_info._deleted)
self.assertTrue(change_info._closed)
+ self.assertEqual(
+ change_info._comments_added,
+ ["Committed 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