def init_modules_stub(self, enable=True): """Enables the modules stub. Args: enable: `True` if the fake service should be enabled, or `False` if the real service should be disabled. """ if not enable: self._disable_stub(MODULES_SERVICE_NAME) return stub = modules_stub.ModulesServiceStub(request_info._LocalRequestInfo()) self._register_stub(MODULES_SERVICE_NAME, stub)
def init_modules_stub(self, enable=True): """Enable the modules stub. Args: enable: True, if the fake service should be enabled, False if real service should be disabled. """ if not enable: self._disable_stub(MODULES_SERVICE_NAME) return stub = modules_stub.ModulesServiceStub(request_info._LocalRequestInfo()) self._register_stub(MODULES_SERVICE_NAME, stub)