1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18import unittest from app import app class TestHealthChecks(unittest.TestCase): def setUp(self): app.testing = True self.app = app.test_client() def test_health_check(self): response = self.app.get('/health') self.assertEqual(response.status_code, 200) self.assertEqual(response.json, {'status': 'UP'}) if __name__ == '__main__': unittest.main()