diff --git a/blogexample/app.py b/blogexample/app.py index 7c19bbb..105f28f 100644 --- a/blogexample/app.py +++ b/blogexample/app.py @@ -5,6 +5,7 @@ from werkzeug.debug import DebuggedApplication + # from flask_ckeditor import CKEditor#, CKEditorField diff --git a/tests/test_views.py b/tests/test_views.py new file mode 100644 index 0000000..53317ee --- /dev/null +++ b/tests/test_views.py @@ -0,0 +1,19 @@ +import pytest +from flask import url_for +from ..blogexample import create_app + +@pytest.fixture +def client(): + app = create_app(debug=True) #test client for application + return app.test_client() + + +def test_index_route(client): + + response = client.get('/') #test the root route + assert response.status_code == 200 + assert b'Welcome' in response.data + + + +