From 2cfc8604623070ecbf8c2b5dd40a82dfbe4acc79 Mon Sep 17 00:00:00 2001 From: Pedro Crespo-Valero <32402063+pcrespov@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:52:04 +0200 Subject: [PATCH] return json_response --- .../web/server/tests/unit/isolated/test_security_api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/web/server/tests/unit/isolated/test_security_api.py b/services/web/server/tests/unit/isolated/test_security_api.py index f7e736204350..e60cab4985ba 100644 --- a/services/web/server/tests/unit/isolated/test_security_api.py +++ b/services/web/server/tests/unit/isolated/test_security_api.py @@ -156,12 +156,12 @@ async def _init(request: web.Request): # get url and deliver product product_name = expected_product_name await _remember_product_name(request, product_name) - return web.HTTPOk() + return web.json_response(status=status.HTTP_200_OK) @routes.post("/v0/hack/{product_name}") async def _set_other_product(request: web.Request): await _remember_product_name(request, request.match_info["product_name"]) - return web.HTTPOk() + return web.json_response(status=status.HTTP_200_OK) @routes.post("/v0/login") async def _login(request: web.Request): @@ -183,7 +183,7 @@ async def _login(request: web.Request): @routes.post("/v0/public") async def _public(request: web.Request): assert await _get_product_name(request) == expected_product_name - return web.HTTPOk() + return web.json_response(status=status.HTTP_200_OK) @routes.post("/v0/admin") @login_required # NOTE: same as `await check_user_authorized(request)`` @@ -192,7 +192,7 @@ async def _public(request: web.Request): ) async def _admin_only(request: web.Request): assert await _get_product_name(request) == expected_product_name - return web.HTTPOk() + return web.json_response(status=status.HTTP_200_OK) @routes.post("/v0/logout") async def _logout(request: web.Request):