Skip to content

pytest #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions blogexample/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from werkzeug.debug import DebuggedApplication


# from flask_ckeditor import CKEditor#, CKEditorField


Expand Down
19 changes: 19 additions & 0 deletions tests/test_views.py
Original file line number Diff line number Diff line change
@@ -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