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

Unified Diff: tests/presubmit_unittest.py

Issue 11566014: Revert 171153 to add a presubmit check to check for closed issues. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 8 years 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 | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/presubmit_unittest.py
===================================================================
--- tests/presubmit_unittest.py (revision 172883)
+++ tests/presubmit_unittest.py (working copy)
@@ -1507,7 +1507,6 @@
'CheckLongLines', 'CheckTreeIsOpen', 'PanProjectChecks',
'CheckLicense',
'CheckOwners',
- 'CheckIssueNotClosed',
'CheckRietveldTryJobExecution',
'CheckSingletonInHeaders',
'CheckSvnModifiedDirectories',
@@ -2396,24 +2395,6 @@
is_committing=False,
uncovered_dirs=set())
- def CheckIssueClosedBase(self, closed):
- input_api = self.MockInputApi(
- presubmit.Change('', '', None, None, 1, 0, None), False)
- input_api.rietveld.get_issue_properties(
- issue=int(input_api.change.issue), messages=False).AndReturn(
- {'closed': closed, 'issue': 1})
- self.mox.ReplayAll()
- return presubmit_canned_checks.CheckIssueNotClosed(
- input_api, presubmit.OutputApi)
-
- def testIssueOpen(self):
- self.assertEqual([], self.CheckIssueClosedBase(False))
-
- def testIssueClosed(self):
- results = self.CheckIssueClosedBase(True)
- self.assertEqual(len(results), 1)
- self.assertTrue(results[0].fatal)
-
def testCannedRunUnitTests(self):
change = presubmit.Change(
'foo1', 'description1', self.fake_root_dir, None, 0, 0, None)
« no previous file with comments | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698