mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 14:29:25 -04:00
Refactor process_letter_notification to make the code easier to read.
- Separated the logic of precompiled and template letters. - Remove the check for research mode, research mode is not relevant to api calls. The test key is used for testing. Refactor upload_pdf_letter to accept a precompile boolean to save a query to template.
This commit is contained in:
@@ -128,7 +128,7 @@ def test_upload_letter_pdf_to_correct_bucket(
|
||||
is_scan_letter=is_precompiled_letter
|
||||
)
|
||||
|
||||
upload_letter_pdf(sample_letter_notification, b'\x00\x01')
|
||||
upload_letter_pdf(sample_letter_notification, b'\x00\x01', precompiled=is_precompiled_letter)
|
||||
|
||||
mock_s3.assert_called_once_with(
|
||||
bucket_name=current_app.config[bucket_config_name],
|
||||
|
||||
Reference in New Issue
Block a user