ModuleNotFoundError: No module named 'function_app' while trying to unit test Python V2 Azure Functions
Clay Casper
166
Reputation points
I'm trying to unit test my python v2 azure function. Here's some of the only documentation (https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=asgi%2Capplication-level&pivots=python-mode-decorators#unit-testing) I could find. I think it's either outdated or there is not enough context. For instance, when it says to import the main function from function_app
, I tried doing that but got an import error. Specifically, ModuleNotFoundError: No module named 'function_app'
. I tried adding init.py but that still didn't work.
Sign in to answer