الملفات
flask_app/test_app.py
omar 6edb729c1a
فشلت بعض الفحوصات
Ghaymah Deploy / test (push) Failing after 11s
Ghaymah Deploy / build (push) Has been skipped
adding testing
2025-10-16 18:19:57 +03:00

21 أسطر
611 B
Python

"""Unit tests for the Flask application."""
import unittest
from flask_app.app import app
class FlaskAppTestCase(unittest.TestCase):
"""Test cases for the Flask application."""
def setUp(self):
"""Set up the test client before each test."""
self.client = app.test_client()
def test_home_route(self):
"""Test that the home route returns the expected message."""
response = self.client.get("/")
self.assertEqual(response.status_code, 200)
self.assertEqual(response.json, {"message": "Hello, Flask!"})
if __name__ == "__main__":
unittest.main()