Files
notifications-admin/tests/app/test_assets.py
Leo Hemsted d6de5508ca make sure static subdir 404s correctly
before each request, we put the current service on the flask session,
except for with the static folder, cos it's not needed.... except, if
we 404, then we return the 404 template, which checks if you're logged
in or not to display different nav bar items. This was crashing when
current_service wasn't set, so we now set it.

also cleaned up some imports and stuff in test files
2017-05-04 11:28:45 +01:00

11 lines
421 B
Python

def test_crown_logo(client):
# This image is used by the email templates, so we should be really careful to make
# sure that its always there.
response = client.get('/static/images/email-template/crown-32px.gif')
assert response.status_code == 200
def test_static_404s_return(client):
response = client.get('/static/images/some-image-that-doesnt-exist.png')
assert response.status_code == 404