From df53ace62ecb74f7a2485af99436ff35341f93c4 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 16 Dec 2024 16:34:20 +0530 Subject: [PATCH] bench: socketio methods --- .../microbenchmarks/bench_web_requests.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/caffeination/microbenchmarks/bench_web_requests.py b/caffeination/microbenchmarks/bench_web_requests.py index 839662d..f63e15a 100644 --- a/caffeination/microbenchmarks/bench_web_requests.py +++ b/caffeination/microbenchmarks/bench_web_requests.py @@ -28,6 +28,21 @@ def bench_request_authed_overheads(): assert resp.status_code == 200 +def bench_request_socketio_auth(): + resp = request("GET", "/api/method/frappe.realtime.get_user_info", auth=True) + assert resp.status_code == 200 + + +def bench_request_socketio_perm_check(): + resp = request( + "GET", + "/api/method/frappe.realtime.has_permission", + auth=True, + data={"doctype": "Role", "name": "Guest"}, + ) + assert resp.status_code == 200 + + def bench_request_getdoc(): resp = request( "POST",