Skip to content

Commit b76a51c

Browse files
committed
fix proxy unit tests
1 parent accd0e8 commit b76a51c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

workers/proxy_worker/dispatcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def gen(resp_queue):
243243
async def _dispatch_grpc_request(self, request):
244244
content_type = request.WhichOneof("content")
245245

246-
match content_type:
246+
match content_type: # noqa
247247
case "worker_init_request":
248248
request_handler = self._handle__worker_init_request
249249
case "function_environment_reload_request":

workers/tests/unittest_proxy/test_dispatcher.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ def fake_import(name, globals=None, locals=None, fromlist=(), level=0):
7979
mock_module.worker_init_request = AsyncMock(return_value="fake_response")
8080
mock_module.function_environment_reload_request = AsyncMock(
8181
return_value="mocked_env_reload_response")
82+
mock_module.version = AsyncMock(return_value="fake_response")
83+
mock_module.version.VERSION = AsyncMock(return_value="1.0.0")
8284
if name in ["azure_functions_worker_v2", "azure_functions_worker_v1"]:
8385
return mock_module
8486
return builtins.__import__(name, globals, locals, fromlist, level)

0 commit comments

Comments
 (0)