diff --git a/test_app.py b/test_app.py new file mode 100644 index 0000000..142a0a9 --- /dev/null +++ b/test_app.py @@ -0,0 +1,21 @@ +import pytest +from app import app + +# ✅ Basic test to ensure the Flask app starts successfully +@pytest.fixture +def client(): + app.testing = True + with app.test_client() as client: + yield client + + +def test_home_route(client): + """Test that the home route returns 200 OK""" + response = client.get('/') + assert response.status_code == 200 + + +def test_weather_page_content(client): + """Check if page contains expected content""" + response = client.get('/') + assert b"Weather" in response.data or b"temperature" in response.data