added tests
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
venv/
|
venv/
|
||||||
.idea/
|
.idea/
|
||||||
|
.pytest_cache
|
||||||
@@ -1,6 +1,24 @@
|
|||||||
|
atomicwrites==1.3.0
|
||||||
|
attrs==19.1.0
|
||||||
|
certifi==2019.6.16
|
||||||
|
chardet==3.0.4
|
||||||
Click==7.0
|
Click==7.0
|
||||||
|
colorama==0.4.1
|
||||||
Flask==1.0.3
|
Flask==1.0.3
|
||||||
|
idna==2.8
|
||||||
|
importlib-metadata==0.18
|
||||||
itsdangerous==1.1.0
|
itsdangerous==1.1.0
|
||||||
Jinja2==2.10.1
|
Jinja2==2.10.1
|
||||||
MarkupSafe==1.1.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
|
Werkzeug==0.15.4
|
||||||
|
zipp==0.5.1
|
||||||
|
|||||||
9
tests/app_test.py
Normal file
9
tests/app_test.py
Normal 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
|
||||||
Reference in New Issue
Block a user