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:
BIN
tests/instance/media/favicon.png
Normal file
BIN
tests/instance/media/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user