9
9
from unittest .mock import patch
10
10
11
11
from azure_functions_worker import protos
12
- from azure_functions_worker .constants import PYTHON_THREADPOOL_THREAD_COUNT , \
13
- PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT , \
14
- PYTHON_THREADPOOL_THREAD_COUNT_MAX_37 , PYTHON_THREADPOOL_THREAD_COUNT_MIN , ENABLE_INIT_INDEXING
12
+ from azure_functions_worker .constants import (PYTHON_THREADPOOL_THREAD_COUNT ,
13
+ PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT ,
14
+ PYTHON_THREADPOOL_THREAD_COUNT_MAX_37 ,
15
+ PYTHON_THREADPOOL_THREAD_COUNT_MIN ,
16
+ ENABLE_INIT_INDEXING )
15
17
from azure_functions_worker .version import VERSION
16
18
from tests .utils import testutils
17
19
from tests .utils .testutils import UNIT_TESTS_ROOT
@@ -841,7 +843,7 @@ def test_functions_metadata_request_with_init_indexing_enabled(self):
841
843
self .assertIsNone (self .dispatcher .function_metadata_exception )
842
844
843
845
@patch .dict (os .environ , {ENABLE_INIT_INDEXING : 'false' })
844
- def test_functions_metadata_request_with_init_indexing_enabled (self ):
846
+ def test_functions_metadata_request_with_init_indexing_disabled (self ):
845
847
init_request = protos .StreamingMessage (
846
848
worker_init_request = protos .WorkerInitRequest (
847
849
host_version = "2.3.4" ,
@@ -862,7 +864,6 @@ def test_functions_metadata_request_with_init_indexing_enabled(self):
862
864
self .assertIsNone (self .dispatcher .function_metadata_result )
863
865
self .assertIsNone (self .dispatcher .function_metadata_exception )
864
866
865
-
866
867
metadata_response = self .loop .run_until_complete (
867
868
self .dispatcher ._handle__functions_metadata_request (metadata_request ))
868
869
@@ -915,12 +916,12 @@ def test_dispatcher_indexing_in_load_request(self):
915
916
self .assertIsNone (self .dispatcher .function_metadata_result )
916
917
917
918
load_request = protos .StreamingMessage (
918
- function_load_request = protos .FunctionLoadRequest (
919
- function_id = "http_trigger" ,
920
- metadata = protos .RpcFunctionMetadata (
921
- directory = str (FUNCTION_APP_DIRECTORY ),
922
- properties = {"worker_indexed" : "True" }
923
- )))
919
+ function_load_request = protos .FunctionLoadRequest (
920
+ function_id = "http_trigger" ,
921
+ metadata = protos .RpcFunctionMetadata (
922
+ directory = str (FUNCTION_APP_DIRECTORY ),
923
+ properties = {"worker_indexed" : "True" }
924
+ )))
924
925
925
926
self .loop .run_until_complete (
926
927
self .dispatcher ._handle__function_load_request (load_request ))
0 commit comments