From bbb1b6dba1e856872362f66d9c387e0a9e7e0a0f Mon Sep 17 00:00:00 2001 From: FivePixels Date: Wed, 4 May 2022 16:08:11 -0500 Subject: Add pytest tests, not functionally working yet. --- app/tests/functional/test_routes.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/tests/functional/test_routes.py (limited to 'app/tests/functional/test_routes.py') diff --git a/app/tests/functional/test_routes.py b/app/tests/functional/test_routes.py new file mode 100644 index 0000000..81e2ce1 --- /dev/null +++ b/app/tests/functional/test_routes.py @@ -0,0 +1,17 @@ +from app import create_app + +def test_home_page(): + """ + GIVEN a Flask application configured for testing + WHEN the '/' page is requested (GET) + THEN check that the response is valid + """ + + flask_app = create_app('flask_test.cfg') + + with flask_app.test_client() as test_client: + response = test_client.get('/') + assert response.status_code == 200 + assert b"Welcome to Strengthy" in response.data + assert b"Strengthy is an open source fitness tracking applicatio that helps users meet their fitness goals." in response.data + assert b"To get started, Sign Up to create an account." in response.data -- cgit v1.2.3