Updated the notification template endpoint to extract the pdf page

before sending it to template preview. This stops the whole pdf file
being sent to template preview for each page which is really inefficient
on network traffic and memory usage.

* Added logic to the endpoint to extract the specific page requested
* Updated tests to add a mock for the new call to utils
* Added a new test case for exceptions in the PDF extraction process
This commit is contained in:
Richard Chapman
2018-03-09 15:50:43 +00:00
parent c7cc7822f7
commit 04048aa220
3 changed files with 71 additions and 4 deletions

View File

@@ -23,6 +23,6 @@ notifications-python-client==4.7.2
# PaaS
awscli-cwlogs>=1.4,<1.5
git+https://github.com/alphagov/notifications-utils.git@25.0.0#egg=notifications-utils==25.0.0
git+https://github.com/alphagov/notifications-utils.git@25.1.0#egg=notifications-utils==25.1.0
git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3