mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
don't use global s3 client
This commit is contained in:
@@ -605,7 +605,7 @@ def test_get_s3_files_handles_exception(mocker):
|
|||||||
|
|
||||||
def test_get_s3_client_default_credentials():
|
def test_get_s3_client_default_credentials():
|
||||||
with patch.dict(os.environ, {}, clear=True):
|
with patch.dict(os.environ, {}, clear=True):
|
||||||
with patch("app.aws.s3.boto3.session.Session") as mock_session:
|
with patch("app.aws.s3.Session") as mock_session:
|
||||||
mock_client = MagicMock()
|
mock_client = MagicMock()
|
||||||
mock_session.return_value.client.return_value = mock_client
|
mock_session.return_value.client.return_value = mock_client
|
||||||
client = get_s3_client()
|
client = get_s3_client()
|
||||||
|
|||||||
Reference in New Issue
Block a user