19 lines
414 B
Python
19 lines
414 B
Python
import unittest
|
|||
|
|
|
||
|
|
from app import create_app
|
||
|
|
|
||
|
|
|
||
|
|
class AppFactoryTest(unittest.TestCase):
|
||
|
|
def test_health_check_returns_ok(self):
|
||
|
|
app = create_app({"TESTING": True})
|
||
|
|
client = app.test_client()
|
||
|
|
|
||
|
|
response = client.get("/health")
|
||
|
|
|
||
|
|
self.assertEqual(response.status_code, 200)
|
||
|
|
self.assertEqual(response.get_json(), {"ok": True})
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
unittest.main()
|