mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 15:56:45 -04:00
more tests
This commit is contained in:
@@ -2,7 +2,7 @@ import os
|
|||||||
import time
|
import time
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from os import getenv
|
from os import getenv
|
||||||
from unittest.mock import MagicMock, Mock, call, patch
|
from unittest.mock import MagicMock, Mock, call
|
||||||
|
|
||||||
import botocore
|
import botocore
|
||||||
import pytest
|
import pytest
|
||||||
@@ -434,7 +434,6 @@ def test_get_s3_files_success(client, mocker):
|
|||||||
# mock_current_app.info.assert_any_call("job_cache length after regen: 0 #notify-debug-admin-1200")
|
# mock_current_app.info.assert_any_call("job_cache length after regen: 0 #notify-debug-admin-1200")
|
||||||
|
|
||||||
|
|
||||||
@patch("app.aws.s3.s3_client", None) # ensure it starts as None
|
|
||||||
def test_get_s3_client(mocker):
|
def test_get_s3_client(mocker):
|
||||||
mock_session = mocker.patch("app.aws.s3.Session")
|
mock_session = mocker.patch("app.aws.s3.Session")
|
||||||
mock_current_app = mocker.patch("app.aws.s3.current_app")
|
mock_current_app = mocker.patch("app.aws.s3.current_app")
|
||||||
@@ -456,7 +455,6 @@ def test_get_s3_client(mocker):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@patch("app.aws.s3.s3_resource", None) # ensure it starts as None
|
|
||||||
def test_get_s3_resource(mocker):
|
def test_get_s3_resource(mocker):
|
||||||
mock_session = mocker.patch("app.aws.s3.Session")
|
mock_session = mocker.patch("app.aws.s3.Session")
|
||||||
mock_current_app = mocker.patch("app.aws.s3.current_app")
|
mock_current_app = mocker.patch("app.aws.s3.current_app")
|
||||||
|
|||||||
Reference in New Issue
Block a user