Skip to content
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
Binary file not shown.
Binary file not shown.
Binary file modified lib/__pycache__/util_datetime.cpython-36.pyc
Binary file not shown.
Binary file modified lib/__pycache__/util_sqlalchemy.cpython-36.pyc
Binary file not shown.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ WTForms-Alchemy==0.16.9
flask_ckeditor

pytz
pytest
requests
22 changes: 22 additions & 0 deletions test_blog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import requests

ENDPOINT = 'http://localhost:8000/'

def test_can_call_endpoint():
response = requests.get(ENDPOINT)
assert response.status_code == 200

def test_can_create_post():
payload = {
"title": "Post 3",
"body": "Body 3",
"taglist":"",
"visible": "y"
}
response = requests.post(ENDPOINT + "/add", json=payload)
assert response.status_code == 200


# def test_can_delete_post():