I installed Python Mock module using PIP.
When I try to import mock running under ‘dev_appserver’, GAE says that it can’t find module ‘mock’.
import mock works perfectly in Python interpreter.
I understand that dev_appserver behaves absolutely correctly because I can’t install modules with PIP on GAE servers.
My question is how technically dev_appserver filters list of modules that can be loaded?
The dev_appserver uses import hooks to prevent importing modules that shouldn’t be available. The relevant code is here, but be warned – it’s easily the most complicated bit of the dev_appserver!