mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 00:41:35 -05:00
Removed the import and directly used json.decoder.JSONDecodeError
as it was failing on Jenkins.
This commit is contained in:
@@ -3,7 +3,6 @@ import json
|
|||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from json.decoder import JSONDecodeError
|
|
||||||
|
|
||||||
import botocore
|
import botocore
|
||||||
import pytest
|
import pytest
|
||||||
@@ -996,7 +995,7 @@ def test_preview_letter_template_precompiled_png_file_type(
|
|||||||
file_type='png'
|
file_type='png'
|
||||||
)
|
)
|
||||||
|
|
||||||
with pytest.raises(JSONDecodeError):
|
with pytest.raises(json.decoder.JSONDecodeError):
|
||||||
mock_post.last_request.json()
|
mock_post.last_request.json()
|
||||||
assert mock_get_letter_pdf.called_once_with(notification)
|
assert mock_get_letter_pdf.called_once_with(notification)
|
||||||
assert base64.b64decode(resp['content']) == png_content
|
assert base64.b64decode(resp['content']) == png_content
|
||||||
@@ -1045,7 +1044,7 @@ def test_preview_letter_template_precompiled_png_template_preview_500_error(
|
|||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
with pytest.raises(JSONDecodeError):
|
with pytest.raises(json.decoder.JSONDecodeError):
|
||||||
mock_post.last_request.json()
|
mock_post.last_request.json()
|
||||||
|
|
||||||
|
|
||||||
@@ -1091,5 +1090,5 @@ def test_preview_letter_template_precompiled_png_template_preview_400_error(
|
|||||||
_expected_status=500
|
_expected_status=500
|
||||||
)
|
)
|
||||||
|
|
||||||
with pytest.raises(JSONDecodeError):
|
with pytest.raises(json.decoder.JSONDecodeError):
|
||||||
mock_post.last_request.json()
|
mock_post.last_request.json()
|
||||||
|
|||||||
Reference in New Issue
Block a user