mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-11 22:14:06 -05:00
We had a report that when clicking on the 'Download this letter' link on the notification page the file was not being downloaded as a PDF file but was given a `.htm` file extension instead. We should be able to stop that happening by using Flask's `send_file` function with the right mimetype. This change updates the `view_letter_notification_as_preview` to use `send_file` and splits out code to get the file data into a separate function. Mocks in the tests have been updated and some unused mocks removed.