From 96662f3f669442cb84ba144282cbc8b3860608e1 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Wed, 28 Sep 2022 16:25:14 +0200 Subject: [PATCH] UT: Fix AgentLogs tests --- .../monkey_island/cc/resources/test_agent_logs.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_logs.py b/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_logs.py index ead1c73a2..42249cf46 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_logs.py +++ b/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_logs.py @@ -47,13 +47,7 @@ def test_agent_logs_endpoint__get_empty(flask_client): "url,log", [(AGENT_LOGS_URL_1, "LoremIpsum1"), (AGENT_LOGS_URL_2, "SecondLoremIpsum")] ) def test_agent_logs_endpoint(flask_client, url, log): - flask_client.put(url, json={"log_contents": log}, follow_redirects=True) + flask_client.put(url, json=log, follow_redirects=True) resp = flask_client.get(url, follow_redirects=True) assert resp.status_code == HTTPStatus.OK assert resp.json == log - - -def test_agent_logs_endpoint__put_bad_json(flask_client): - resp = flask_client.put(AGENT_LOGS_URL_1, json={"bad_key": "bad"}, follow_redirects=True) - - assert resp.status_code == HTTPStatus.INTERNAL_SERVER_ERROR