From 8615ae554f82326228a15dbc72a223e9a76029d6 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 3 Aug 2022 17:51:42 +0530 Subject: [PATCH] UT: Change POST requests to PUT in AgentConfiguration resource tests --- .../monkey_island/cc/resources/test_agent_configuration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py b/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py index cd0e7eb31..e809084b9 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py +++ b/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py @@ -26,7 +26,7 @@ def flask_client(build_flask_client): def test_agent_configuration_endpoint(flask_client): - resp = flask_client.post( + resp = flask_client.put( AGENT_CONFIGURATION_URL, json=AgentConfiguration.to_mapping(AGENT_CONFIGURATION), follow_redirects=True, @@ -39,12 +39,12 @@ def test_agent_configuration_endpoint(flask_client): def test_agent_configuration_invalid_config(flask_client): - resp = flask_client.post(AGENT_CONFIGURATION_URL, json={"invalid_config": "invalid_stuff"}) + resp = flask_client.put(AGENT_CONFIGURATION_URL, json={"invalid_config": "invalid_stuff"}) assert resp.status_code == 400 def test_agent_configuration_invalid_json(flask_client): - resp = flask_client.post(AGENT_CONFIGURATION_URL, data="InvalidJson!") + resp = flask_client.put(AGENT_CONFIGURATION_URL, data="InvalidJson!") assert resp.status_code == 400