From dbc138d26338c85607beadd6d8807e605af233dd Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 18 Jul 2022 14:52:05 -0400 Subject: [PATCH] BB: Add replace_propagation_credentials() --- envs/monkey_zoo/blackbox/test_configurations/utils.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/envs/monkey_zoo/blackbox/test_configurations/utils.py b/envs/monkey_zoo/blackbox/test_configurations/utils.py index 929b5afcb..c9ef2dd01 100644 --- a/envs/monkey_zoo/blackbox/test_configurations/utils.py +++ b/envs/monkey_zoo/blackbox/test_configurations/utils.py @@ -1,5 +1,5 @@ from dataclasses import replace -from typing import Sequence +from typing import Sequence, Tuple from common.configuration import ( AgentConfiguration, @@ -9,6 +9,7 @@ from common.configuration import ( PropagationConfiguration, ScanTargetConfiguration, ) +from common.credentials import Credentials from . import TestConfiguration @@ -87,3 +88,9 @@ def replace_agent_configuration( test_configuration: TestConfiguration, agent_configuration: AgentConfiguration ) -> TestConfiguration: return replace(test_configuration, agent_configuration=agent_configuration) + + +def replace_propagation_credentials( + test_configuration: TestConfiguration, propagation_credentials: Tuple[Credentials, ...] +): + return replace(test_configuration, propagation_credentials=propagation_credentials)