mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 13:39:57 -04:00
handle invalid upload errors correctly
previously it assumed that invalid_pages would always exist, however it might be `None` if the error isn't on a specific page. Errors on specific pages include a page not being A4 or content being outside the boundary. Errors not on specific pages include the file not being a pdf, or containing too many pages
This commit is contained in:
@@ -458,7 +458,7 @@ def test_get_letter_validation_error_for_unknown_error():
|
||||
),
|
||||
(
|
||||
'letter-too-long',
|
||||
[2],
|
||||
None,
|
||||
'Your letter is too long',
|
||||
(
|
||||
'Letters must be 10 pages or less. '
|
||||
@@ -471,7 +471,7 @@ def test_get_letter_validation_error_for_unknown_error():
|
||||
),
|
||||
(
|
||||
'unable-to-read-the-file',
|
||||
[2],
|
||||
None,
|
||||
'There’s a problem with your file',
|
||||
(
|
||||
'Notify cannot read this PDF.'
|
||||
|
||||
Reference in New Issue
Block a user