diff --git a/.gitignore b/.gitignore index ca5e3f2..0cd3faf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ venv/ -.idea/ \ No newline at end of file +.idea/ +.pytest_cache \ No newline at end of file diff --git a/app.py b/app.py index af32623..c8f34f6 100644 --- a/app.py +++ b/app.py @@ -9,4 +9,4 @@ def hello_world(): if __name__ == '__main__': - app.run(debug=True, host='0.0.0.0') + app.run(debug=True, host='0.0.0.0') \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 30cb033..69bd613 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/tests/app_test.py b/tests/app_test.py new file mode 100644 index 0000000..389060c --- /dev/null +++ b/tests/app_test.py @@ -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