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

Unified Diff: tests/pending_manager_test.py

Issue 138173005: CQ to always post a message when Commit box is unchecked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: Addressed reviewer's comments Created 6 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 | « pending_manager.py ('k') | verification/fake.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/pending_manager_test.py
diff --git a/tests/pending_manager_test.py b/tests/pending_manager_test.py
index 0407eae52bc6790daa4e402d2cd11a3c3571c3cc..12f73d489555008f213fa6593fd4c3888ccc360b 100755
--- a/tests/pending_manager_test.py
+++ b/tests/pending_manager_test.py
@@ -114,7 +114,7 @@ class TestPendingManager(mocks.TestCase):
self.context.rietveld.check_calls(
[ _try_comment(),
"set_flag(%d, 1, 'commit', False)" % issue,
- "add_comment(%d, %r)" % (issue, pc.FAILED_NO_MESSAGE)])
+ "add_comment(%d, %r)" % (issue, fake.failed_message())])
else:
if success:
self.context.checkout.check_calls(
@@ -131,11 +131,11 @@ class TestPendingManager(mocks.TestCase):
self.context.rietveld.check_calls(
[ _try_comment(),
"set_flag(%d, 1, 'commit', False)" % issue,
- "add_comment(%d, %r)" % (issue, pc.FAILED_NO_MESSAGE)])
+ "add_comment(%d, %r)" % (issue, fake.failed_message())])
else:
self.context.rietveld.check_calls(
[ "set_flag(%d, 1, 'commit', False)" % issue,
- "add_comment(%d, %r)" % (issue, pc.FAILED_NO_MESSAGE)])
+ "add_comment(%d, %r)" % (issue, fake.failed_message())])
def _prepare_apply_commit(self, index, issue, server_hooks_missing=False):
"""Returns a frequent sequence of action happening on the Checkout object.
@@ -265,7 +265,7 @@ class TestPendingManager(mocks.TestCase):
])
self.context.rietveld.check_calls(
[ _try_comment(),
- "add_comment(%d, %r)" % (issue, pc.FAILED_NO_MESSAGE),
+ "add_comment(%d, %r)" % (issue, fake.failed_message()),
])
self.context.status.check_names(['initial', 'abort'])
@@ -571,7 +571,7 @@ class TestPendingManager(mocks.TestCase):
self.context.checkout.check_calls(
self._prepare_apply_commit(0, issue, server_hooks_missing=True))
- def testDisapeared(self):
+ def testDisappeared(self):
issue = 31337
verifiers = [
project_base.ProjectBaseUrlVerifier(
@@ -591,6 +591,8 @@ class TestPendingManager(mocks.TestCase):
pc.scan_results()
self.assertEqual(0, len(pc.queue.iterate()))
self.context.status.check_names(['abort'])
+ self.context.rietveld.check_calls(
+ ["add_comment(%d, 'CQ bit was unchecked on CL. Ignoring.')" % issue])
def _get_pc_reviewer(self):
verifiers = [
« no previous file with comments | « pending_manager.py ('k') | verification/fake.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698