added tests

This commit is contained in:
2019-07-04 17:09:33 +01:00
parent 8c8eae000d
commit 0a26afdbfe
4 changed files with 30 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
venv/
.idea/
.pytest_cache

View File

@@ -1,6 +1,24 @@
atomicwrites==1.3.0
attrs==19.1.0
certifi==2019.6.16
chardet==3.0.4
Click==7.0
colorama==0.4.1
Flask==1.0.3
idna==2.8
importlib-metadata==0.18
itsdangerous==1.1.0
Jinja2==2.10.1
MarkupSafe==1.1.1
more-itertools==7.1.0
packaging==19.0
pluggy==0.12.0
py==1.8.0
pyparsing==2.4.0
pytest==5.0.0
requests==2.22.0
six==1.12.0
urllib3==1.25.3
wcwidth==0.1.7
Werkzeug==0.15.4
zipp==0.5.1

9
tests/app_test.py Normal file
View File

@@ -0,0 +1,9 @@
import pytest
import requests
url = 'http://127.0.0.1:5000' # The root url of the flask app
def test_index_page():
r = requests.get(url+'/') # Assumses that it has a path of "/"
assert r.status_code == 200 # Assumes that it will return a 200 response