mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 16:31:15 -05:00
Added a freezetime to the test test_create_letters_pdf_calls_s3upload
as it failed on prodction and I managed to get it to fail locally
{'file_location': '2018-02-12/NOTIFY.FOO.D.2.C.N.20180212164427.PDF'}
!= {'file_location': '2018-02-12/NOTIFY.FOO.D.2.C.N.20180212164428.PDF'}
A freeze time till ensure that the finame which is based on the time
will not fail.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import time
|
||||
from flask import current_app
|
||||
|
||||
from unittest.mock import call
|
||||
@@ -103,6 +104,7 @@ def test_get_letters_pdf_calculates_billing_units(
|
||||
assert billable_units == expected_billable_units
|
||||
|
||||
|
||||
@freeze_time("2017-12-04 17:31:00")
|
||||
def test_create_letters_pdf_calls_s3upload(mocker, sample_letter_notification):
|
||||
mocker.patch('app.celery.letters_pdf_tasks.get_letters_pdf', return_value=(b'\x00\x01', '1'))
|
||||
mock_s3 = mocker.patch('app.celery.letters_pdf_tasks.s3upload')
|
||||
|
||||
Reference in New Issue
Block a user