Exemple #1
0
 def test_get_detected_status_text_warnings(self):
     self.assertEqual(
         message.get_detected_status_text(['change'], WARNINGS, SUCCESS),
         'problem in the build')
     self.assertEqual(
         message.get_detected_status_text(['change'], WARNINGS, None),
         'problem in the build')
Exemple #2
0
 def test_get_detected_status_text_other(self):
     self.assertEqual(
         message.get_detected_status_text(['problem'], SKIPPED, None),
         'skipped build')
     self.assertEqual(
         message.get_detected_status_text(['problem'], RETRY, None),
         'retry build')
     self.assertEqual(
         message.get_detected_status_text(['problem'], CANCELLED, None),
         'cancelled build')
Exemple #3
0
 def test_get_detected_status_text_exception(self):
     self.assertEqual(
         message.get_detected_status_text(['problem'], EXCEPTION, FAILURE),
         'build exception')
     self.assertEqual(
         message.get_detected_status_text(['problem'], EXCEPTION, SUCCESS),
         'build exception')
     self.assertEqual(
         message.get_detected_status_text(['problem'], EXCEPTION, None),
         'build exception')
Exemple #4
0
 def test_get_detected_status_text_failure(self):
     self.assertEqual(
         message.get_detected_status_text(['change'], FAILURE, FAILURE),
         'failed build')
     self.assertEqual(
         message.get_detected_status_text(['change'], FAILURE, SUCCESS),
         'new failure')
     self.assertEqual(
         message.get_detected_status_text(['change'], FAILURE, None),
         'failed build')
     self.assertEqual(
         message.get_detected_status_text(['problem'], FAILURE, FAILURE),
         'failed build')
     self.assertEqual(
         message.get_detected_status_text(['problem'], FAILURE, SUCCESS),
         'new failure')
     self.assertEqual(
         message.get_detected_status_text(['problem'], FAILURE, None),
         'failed build')
Exemple #5
0
    def test_get_detected_status_text_success(self):
        self.assertEqual(
            message.get_detected_status_text(['change'], SUCCESS, FAILURE),
            'restored build')
        self.assertEqual(
            message.get_detected_status_text(['change'], SUCCESS, SUCCESS),
            'passing build')
        self.assertEqual(
            message.get_detected_status_text(['change'], SUCCESS, None),
            'passing build')

        self.assertEqual(
            message.get_detected_status_text(['problem'], SUCCESS, FAILURE),
            'passing build')
        self.assertEqual(
            message.get_detected_status_text(['problem'], SUCCESS, SUCCESS),
            'passing build')
        self.assertEqual(
            message.get_detected_status_text(['problem'], SUCCESS, None),
            'passing build')