Files
penracourses/rad/test_helpers.py
T
2022-12-12 12:16:42 +00:00

6 lines
274 B
Python

from http import HTTPStatus
def AssertNotFound(client, url):
"""Helper to quickly test for urls that should return a 404 (NOT FOUND) error"""
response = client.get(url)
assert response.status_code == HTTPStatus.NOT_FOUND, f"Response content: {response.content}"