Example #1
0
class WritingCustomStatus(unittest.TestCase):
    def setUp(self):
        self.whale = WhaleAlert(TEST_WORKING_DIR)
        self.config = self.whale.get_configuration()
        self.status = self.whale.get_status()
        self.database = self.whale.get_database()

    def tearDown(self):
        cleanup_working_directories()

    def test_writing_well_formated_status_returns_true(self):
        success = self.whale.write_custom_status(good_status)
        self.assertEqual(success, True)

    def test_writing_badly_formated_status_returns_false(self):
        success = self.whale.write_custom_status(bad_formatted_status)
        self.assertEqual(success, False)

    def test_writing_status_with_no_working_directory_returns_false(self):
        whale = WhaleAlert()
        success = whale.write_custom_status(good_status)
        self.assertEqual(success, False)
Example #2
0
 def test_writing_status_with_no_working_directory_returns_false(self):
     whale = WhaleAlert()
     success = whale.write_custom_status(good_status)
     self.assertEqual(success, False)