def testFailureProblemModeOldFailure(self):
     build = self.setUpBuild(FAILURE)
     self.assertEqual(
         "The Buildbot has detected a failed build", mail._defaultMessageIntro("problem", FAILURE, build)
     )
 def testFailureChangeModeNewResult(self):
     build = self.setUpBuild(SUCCESS)
     self.assertEqual("The Buildbot has detected a new failure", mail._defaultMessageIntro("change", FAILURE, build))
 def testFailureProblemModeNewFailure(self):
     build = self.setUpBuild(SUCCESS)
     self.assertEqual(
         "The Buildbot has detected a new failure", mail._defaultMessageIntro("problem", FAILURE, build)
     )
 def testCancelled(self):
     build = self.setUpBuild()
     self.assertEqual("The Build was cancelled by the user", mail._defaultMessageIntro("all", CANCELLED, build))
 def testFailureChangeModeFirstBuild(self):
     build = self.setUpBuild()
     self.assertEqual(
         "The Buildbot has detected a failed build", mail._defaultMessageIntro("change", FAILURE, build)
     )
 def testSuccessChangeModeNewSuccess(self):
     build = self.setUpBuild(FAILURE)
     self.assertEqual("The Buildbot has detected a restored build",
                      mail._defaultMessageIntro("change", SUCCESS, build))
 def testException(self):
     build = self.setUpBuild()
     self.assertEqual(
         "The Buildbot has detected a build exception", mail._defaultMessageIntro("all", EXCEPTION, build)
     )
 def testFailureProblemModeNewFailure(self):
     build = self.setUpBuild(SUCCESS)
     self.assertEqual("The Buildbot has detected a new failure",
                      mail._defaultMessageIntro("problem", FAILURE, build))
 def testFailureProblemModeOldFailure(self):
     build = self.setUpBuild(FAILURE)
     self.assertEqual("The Buildbot has detected a failed build",
                      mail._defaultMessageIntro("problem", FAILURE, build))
 def testFailureChangeModeFirstBuild(self):
     build = self.setUpBuild()
     self.assertEqual("The Buildbot has detected a failed build",
                      mail._defaultMessageIntro("change", FAILURE, build))
 def testFailureChangeModeNewResult(self):
     build = self.setUpBuild(SUCCESS)
     self.assertEqual("The Buildbot has detected a new failure",
                      mail._defaultMessageIntro("change", FAILURE, build))
 def testCancelled(self):
     build = self.setUpBuild()
     self.assertEqual("The Build was cancelled by the user",
                      mail._defaultMessageIntro("all", CANCELLED, build))
 def testException(self):
     build = self.setUpBuild()
     self.assertEqual("The Buildbot has detected a build exception",
                      mail._defaultMessageIntro("all", EXCEPTION, build))
 def testSuccessChangeModeSuccessAgain(self):
     build = self.setUpBuild(SUCCESS)
     self.assertEqual("The Buildbot has detected a passing build",
                      mail._defaultMessageIntro("change", SUCCESS, build))
 def testWarnings(self):
     build = self.setUpBuild()
     self.assertEqual(
         "The Buildbot has detected a problem in the build", mail._defaultMessageIntro("all", WARNINGS, build)
     )
 def testSuccessChangeModeNewSuccess(self):
     build = self.setUpBuild(FAILURE)
     self.assertEqual(
         "The Buildbot has detected a restored build", mail._defaultMessageIntro("change", SUCCESS, build)
     )
 def testSuccessChangeModeFirstBuild(self):
     build = self.setUpBuild()
     self.assertEqual(
         "The Buildbot has detected a passing build", mail._defaultMessageIntro("change", SUCCESS, build)
     )
 def testWarnings(self):
     build = self.setUpBuild()
     self.assertEqual("The Buildbot has detected a problem in the build",
                      mail._defaultMessageIntro("all", WARNINGS, build))