Skip to content

Commit 2cfc860

Browse files
committed
return json_response
1 parent 93c9669 commit 2cfc860

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

services/web/server/tests/unit/isolated/test_security_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ async def _init(request: web.Request):
156156
# get url and deliver product
157157
product_name = expected_product_name
158158
await _remember_product_name(request, product_name)
159-
return web.HTTPOk()
159+
return web.json_response(status=status.HTTP_200_OK)
160160

161161
@routes.post("/v0/hack/{product_name}")
162162
async def _set_other_product(request: web.Request):
163163
await _remember_product_name(request, request.match_info["product_name"])
164-
return web.HTTPOk()
164+
return web.json_response(status=status.HTTP_200_OK)
165165

166166
@routes.post("/v0/login")
167167
async def _login(request: web.Request):
@@ -183,7 +183,7 @@ async def _login(request: web.Request):
183183
@routes.post("/v0/public")
184184
async def _public(request: web.Request):
185185
assert await _get_product_name(request) == expected_product_name
186-
return web.HTTPOk()
186+
return web.json_response(status=status.HTTP_200_OK)
187187

188188
@routes.post("/v0/admin")
189189
@login_required # NOTE: same as `await check_user_authorized(request)``
@@ -192,7 +192,7 @@ async def _public(request: web.Request):
192192
)
193193
async def _admin_only(request: web.Request):
194194
assert await _get_product_name(request) == expected_product_name
195-
return web.HTTPOk()
195+
return web.json_response(status=status.HTTP_200_OK)
196196

197197
@routes.post("/v0/logout")
198198
async def _logout(request: web.Request):

0 commit comments

Comments
 (0)