forked from p34709852/monkey
Island: Return empty str, not dict on 404 in AgentLogs.get()
This commit is contained in:
parent
c706466cdd
commit
07a6f49e8b
|
@ -23,7 +23,7 @@ class AgentLogs(AbstractResource):
|
|||
log_contents = self._agent_log_repository.get_agent_log(agent_id)
|
||||
except UnknownRecordError as err:
|
||||
logger.error(f"Error occurred while getting agent log: {err}")
|
||||
return {}, HTTPStatus.NOT_FOUND
|
||||
return "", HTTPStatus.NOT_FOUND
|
||||
|
||||
return log_contents, HTTPStatus.OK
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ def flask_client(build_flask_client):
|
|||
def test_agent_logs_endpoint__get_empty(flask_client):
|
||||
resp = flask_client.get(AGENT_LOGS_URL_1, follow_redirects=True)
|
||||
assert resp.status_code == HTTPStatus.NOT_FOUND
|
||||
assert resp.json == {}
|
||||
assert resp.json == ""
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
Loading…
Reference in New Issue