Formatting
All checks were successful
Snyk / security (push) Successful in 50s

This commit is contained in:
2025-06-22 22:25:48 +01:00
parent 4d60b89b02
commit 8e8cb5c33e
5 changed files with 27 additions and 30 deletions

View File

@ -3,6 +3,7 @@
"""PyTest unit tests."""
import os
import pytest
from app.app import app, csrf

View File

@ -3,10 +3,10 @@
"""Tests for app/app.py"""
from tests import client # pragma: no cover
from tests import client # pragma: no cover
def test_index(client) -> None:
"""Ensure that the index page is loaded correctly."""
req = client.get('/')
req = client.get("/")
assert req.status_code == 200 and "ePage" in req.text

View File

@ -7,9 +7,5 @@ from app.send_page import send_page
def test_send_page_no_env() -> None:
"""Ensure the API returns an error if no API key specified."""
result = send_page(
name='Unit Test',
email='none@none.com',
message='Unit Test'
)
assert not result[0] and result[1].get('token') == 'invalid'
result = send_page(name="Unit Test", email="none@none.com", message="Unit Test")
assert not result[0] and result[1].get("token") == "invalid"