mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 17:45:41 -04:00
more tests
This commit is contained in:
@@ -737,7 +737,7 @@ def test_clear_templates_from_cache(mocker):
|
|||||||
|
|
||||||
@patch("app.commands.s3.purge_bucket")
|
@patch("app.commands.s3.purge_bucket")
|
||||||
@patch("app.commands.current_app")
|
@patch("app.commands.current_app")
|
||||||
def test_purge_csv_bucket(mock_current_app, mock_purge_bucket):
|
def test_purge_csv_bucket(mock_current_app, mock_purge_bucket, notify_api):
|
||||||
mock_current_app.config = {
|
mock_current_app.config = {
|
||||||
"CSV_UPLOAD_BUCKET": {
|
"CSV_UPLOAD_BUCKET": {
|
||||||
"bucket": "test-bucket",
|
"bucket": "test-bucket",
|
||||||
@@ -746,7 +746,8 @@ def test_purge_csv_bucket(mock_current_app, mock_purge_bucket):
|
|||||||
"region": "us-north-1",
|
"region": "us-north-1",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
purge_csv_bucket()
|
runner = notify_api.test_cli_runner()
|
||||||
|
runner.invoke(purge_csv_bucket)
|
||||||
|
|
||||||
mock_purge_bucket.assert_called_once_with(
|
mock_purge_bucket.assert_called_once_with(
|
||||||
"test-bucket", "FAKE_ACCESS_KEY", "FAKE_SECRET_KEY", "us-north-1"
|
"test-bucket", "FAKE_ACCESS_KEY", "FAKE_SECRET_KEY", "us-north-1"
|
||||||
|
|||||||
Reference in New Issue
Block a user