Begin testing

This commit is contained in:
2023-06-12 10:36:14 +02:00
parent 869ba82695
commit ae80d8b87f
11 changed files with 161 additions and 19 deletions

12
tests/test_main.py Normal file
View File

@@ -0,0 +1,12 @@
from beflask import app
def test_config():
assert not app.create_app()[1].testing
assert app.create_app("testing")[1].testing
def test_index(client):
response = client.get("/")
# check image is in the response
assert b"img/robert-lukeman-_RBcxo9AU-U-unsplash.jpg" in response.data