Skip to content

Commit 98a1174

Browse files
committed
add default value for repos array in function body
1 parent 9803b96 commit 98a1174

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

terraform/services/ecr-cleanup/lambda_src/test_lambda_function.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,11 @@ def mock_boto3_clients():
203203

204204

205205
def _setup_handler_mocks( # pylint: disable=too-many-arguments,too-many-positional-arguments
206-
mock_ssm, mock_ecs, mock_ecr, opted_in_repos=['dpc-attribution'],
206+
mock_ssm, mock_ecs, mock_ecr, opted_in_repos=None,
207207
cluster_arns=None, task_arns=None, task_images=None, ecr_images=None):
208208
"""Configures SSM, ECS, and ECR client mocks for lambda_handler integration tests."""
209+
if opted_in_repos is None:
210+
opted_in_repos = ['dpc-attribution']
209211
mock_ssm.get_parameter.return_value = {
210212
'Parameter': {'Value': json.dumps(opted_in_repos)}
211213
}

0 commit comments

Comments
 (0)