def MockModelStaticBase(self, model_name, method_name, *args):
    test_class_models = self.GetTestClassModule().models
    model_class = getattr(test_class_models, model_name)
    if not '%s:%s' % (model_name, method_name) in self._set_mock:
      mock_model = self.mox.CreateMock(getattr(model_class, method_name))
      self.stubs.Set(model_class, method_name, mock_model)
      self._set_mock['%s:%s' % (model_name, method_name)] = mock_model
    model = self.mox.CreateMockAnything()
    return getattr(model_class, method_name)(*args)
Mock a model static method, return a mock setup.
dataset/ETHPy150Open google/simian/src/tests/simian/mac/common/test_base.py/RequestHandlerTest.MockModelStaticBase