def _init_modules_stub(self, **_):
from google.appengine.api import request_info<EOL>all_versions = {}  <EOL>def_versions = {}  <EOL>m2h = {}  <EOL>for module in self.configuration.modules:<EOL><INDENT>module_name = module._module_name or '<STR_LIT:default>'<EOL>module_version = module._version or '<STR_LIT:1>'<EOL>all_versions[module_name] = [module_version]<EOL>def_versions[module_name] = module_version<EOL>m2h[module_name] = {module_version: '<STR_LIT>'}<EOL><DEDENT>request_info._local_dispatcher = request_info._LocalFakeDispatcher(<EOL>module_names=list(all_versions),<EOL>module_name_to_versions=all_versions,<EOL>module_name_to_default_versions=def_versions,<EOL>module_name_to_version_to_hostname=m2h)<EOL>self.testbed.init_modules_stub()<EOL>
Initializes the modules stub based off of your current yaml files

        Implements solution from
        http://stackoverflow.com/questions/28166558/invalidmoduleerror-when-using-testbed-to-unit-test-google-app-engine