tests: Work around mimetype issue

This commit is contained in:
Florian Bruhin 2021-01-27 18:41:51 +01:00
parent 05bb3942d4
commit dc5d366642
1 changed files with 6 additions and 0 deletions

View File

@ -60,6 +60,12 @@ def send_data(path):
data_dir = END2END_DIR / 'data'
if (data_dir / path).is_dir():
path += '/index.html'
if path == 'service-worker/worker.js':
# For some reason, Flask returns this with a text/plain mimetype on GitHub
# Actions with Windows?!
flask.send_file(path, mimetype='text/javascript')
return flask.send_from_directory(data_dir, path)