Skip to content
Snippets Groups Projects
Commit 86b4248c authored by Teemu Autto's avatar Teemu Autto
Browse files

Check frontpage for magic string.

parent 62486df9
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,6 @@ environment. ...@@ -8,7 +8,6 @@ environment.
import requests import requests
import pytest import pytest
@pytest.fixture @pytest.fixture
def deployment_address(pytestconfig: pytest.Config): def deployment_address(pytestconfig: pytest.Config):
""" """
...@@ -56,3 +55,14 @@ def test_404(deployment_address, path="/_404"): ...@@ -56,3 +55,14 @@ def test_404(deployment_address, path="/_404"):
assert resp.status_code == 404, f"Expected to receive 404 for path {path}" assert resp.status_code == 404, f"Expected to receive 404 for path {path}"
# QED # QED
def test_fronpage_loading(deployment_address):
"""
Fetch fronpage of our application, and check for known string.
"""
from test_app import IN_TITLE # pylint: disable=import-outside-toplevel
resp = requests.get(deployment_address, timeout=5)
assert resp.status_code == 200, f"Failed to fetch page {deployment_address}"
assert IN_TITLE.encode() in resp.content
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment