support a media/ dir under the instance dir

this is for miscellaneous files that should be served directly rather
than being a page route
This commit is contained in:
2020-03-08 11:48:49 -05:00
parent 16373d3e55
commit 2634c144a7
4 changed files with 13 additions and 1 deletions

View File

@@ -21,3 +21,9 @@ def test_title_override():
response = client.get('/no-title')
assert response.status_code == 200
assert b'<title>suou.net</title>' in response.data
def test_media_file_access(client):
response = client.get('/media/favicon.png')
assert response.status_code == 200
assert response.headers['content-type'] == 'image/png'