diff --git a/tests/conftest.py b/tests/conftest.py index f155976..9182cff 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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) \ No newline at end of file + return app.test_client() \ No newline at end of file diff --git a/tests/test_search.py b/tests/test_search.py new file mode 100644 index 0000000..fbd3534 --- /dev/null +++ b/tests/test_search.py @@ -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 \ No newline at end of file