UT: Change POST requests to PUT in AgentConfiguration resource tests

This commit is contained in:
Shreya Malviya 2022-08-03 17:51:42 +05:30
parent 12ee8756f6
commit 8615ae554f
1 changed files with 3 additions and 3 deletions

View File

@ -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