|
|
|
@ -1507,7 +1507,6 @@ class CannedChecksUnittest(PresubmitTestsBase):
|
|
|
|
|
'CheckLongLines', 'CheckTreeIsOpen', 'PanProjectChecks',
|
|
|
|
|
'CheckLicense',
|
|
|
|
|
'CheckOwners',
|
|
|
|
|
'CheckIssueNotClosed',
|
|
|
|
|
'CheckRietveldTryJobExecution',
|
|
|
|
|
'CheckSingletonInHeaders',
|
|
|
|
|
'CheckSvnModifiedDirectories',
|
|
|
|
@ -2396,24 +2395,6 @@ class CannedChecksUnittest(PresubmitTestsBase):
|
|
|
|
|
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)
|
|
|
|
|