File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 66from unittest .mock import patch
77import typing
88
9- from azure_functions_worker .utils import common , wrappers
9+ from azure_functions_worker .utils import common , wrappers , library_importer
1010
1111
1212TEST_APP_SETTING_NAME = "TEST_APP_SETTING_NAME"
@@ -367,3 +367,14 @@ def _unset_feature_flag(self):
367367 os .environ .pop (TEST_FEATURE_FLAG )
368368 except KeyError :
369369 pass
370+
371+ def test_library_importer_invalid_import (self ):
372+ sys .path .clear ()
373+ sys .modules .pop ('azure.functions' )
374+ sys .path .insert (0 , self ._dummy_sdk_sys_path )
375+ common .get_sdk_from_sys_path ()
376+ functionapp = library_importer .get_azure_function_app ()
377+ self .assertIsNone (functionapp )
378+
379+ function = library_importer .get_azure_function_app ()
380+ self .assertIsNone (function )
You can’t perform that action at this time.
0 commit comments