Skip to content

Commit

Permalink
more fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
sastels committed Nov 18, 2024
1 parent bcb270a commit d04db82
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/app/celery/test_process_sns_receipts_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_process_sns_results_does_not_process_other_providers(sample_template, m
)

process_sns_results(response=sns_success_callback(reference="ref1")) is None
assert mock_logger.called_once_with("")
assert mock_logger.call_count == 1
assert not mock_dao.called


Expand Down
4 changes: 2 additions & 2 deletions tests/app/celery/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ def test_acknowledge_happy_path(self, mocker):
acknowledge_sms_normal_mock = mocker.patch("app.sms_normal.acknowledge", return_value=True)
acknowledge_sms_priority_mock = mocker.patch("app.sms_bulk.acknowledge", return_value=False)
acknowledge_receipt(SMS_TYPE, NORMAL, receipt)
assert acknowledge_sms_normal_mock.called_once_with(receipt)
acknowledge_sms_normal_mock.assert_called_once_with(receipt)
assert acknowledge_sms_priority_mock.not_called()

def test_acknowledge_wrong_queue(self, mocker, notify_api):
receipt = uuid.uuid4()
acknowledge_sms_bulk_mock = mocker.patch("app.sms_bulk.acknowledge", return_value=True)
acknowledge_receipt(EMAIL_TYPE, NORMAL, receipt)
assert acknowledge_sms_bulk_mock.called_once_with(receipt)
acknowledge_sms_bulk_mock.assert_called_once_with(receipt)

def test_acknowledge_no_queue(self):
with pytest.raises(ValueError):
Expand Down
4 changes: 2 additions & 2 deletions tests/app/template/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ def test_preview_letter_template_precompiled_pdf_file_type(notify_api, client, a
file_type="pdf",
)

assert mock_get_letter_pdf.called_once_with(notification)
mock_get_letter_pdf.assert_called_once_with(notification)
assert base64.b64decode(resp["content"]) == content


Expand Down Expand Up @@ -1334,7 +1334,7 @@ def test_preview_letter_template_precompiled_png_file_type_or_pdf_with_overlay(

with pytest.raises(ValueError):
mock_post.last_request.json()
assert mock_get_letter_pdf.called_once_with(notification)
mock_get_letter_pdf.assert_called_once_with(notification)
assert base64.b64decode(resp["content"]) == expected_returned_content


Expand Down

0 comments on commit d04db82

Please sign in to comment.