예제 #1
0
  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)
예제 #2
0
파일: __init__.py 프로젝트: CapeGeek/csuf
  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)