Added overall application build test

master
Dylan DiGeronimo 2020-01-26 19:11:35 -05:00
parent 6094fbb608
commit ec961c39c3
2 changed files with 11 additions and 5 deletions

View File

@ -27,8 +27,4 @@ def app():
# Create the test client
@pytest.fixture
def client(app):
return app.test_client()
# TODO: Possible functions/features to test:
# - Constructing app without errors (overall integration test)
# - Search results (feature test)
return app.test_client()

10
tests/test_search.py Normal file
View File

@ -0,0 +1,10 @@
import pytest
# TODO: Possible functions/features to test:
# - Search results (feature test)
# Test that the application can build and serve the home page
# This is a very hacked together way to test this, may try to improve it at some point but for now it works
def test_app_runs(client):
res = client.get("/")
assert b'Unofficial copyright search prototype' in res.data