BB: POST config and credentials as JSON

This commit is contained in:
Mike Salvatore 2022-07-22 13:21:57 -04:00
parent e1691b108f
commit 878f12736f
1 changed files with 4 additions and 4 deletions

View File

@ -34,17 +34,17 @@ class MonkeyIslandClient(object):
@avoid_race_condition
def import_config(self, test_configuration: TestConfiguration):
self.requests.post(
self.requests.post_json(
"api/agent-configuration",
data=AgentConfiguration.to_mapping(test_configuration.agent_configuration),
json=AgentConfiguration.to_mapping(test_configuration.agent_configuration),
)
serialized_propagation_credentials = [
Credentials.to_mapping(credentials)
for credentials in test_configuration.propagation_credentials
]
self.requests.post(
self.requests.post_json(
"/api/propagation-credentials/configured-credentials",
data=serialized_propagation_credentials,
json=serialized_propagation_credentials,
)
@avoid_race_condition