def testPut(self):

    class _BaseModel(models.BaseModel):
      pass

    mock_func = self.mox.CreateMockAnything()

    b = _BaseModel()

    if type(__builtins__) is dict:
      # __builtins__ is a dict under setuptools + python. ???
      self.mox.StubOutWithMock(models.db.Model, 'put')
      models.db.Model.put().AndReturn(None)
    else:
      self.mox.StubOutWithMock(__builtins__, 'super')
      __builtins__.super(models.BaseModel, b).AndReturn(mock_func)
      mock_func.put().AndReturn(None)
    self.mox.StubOutWithMock(b, 'MemcacheAutoUpdate')
    b.MemcacheAutoUpdate().AndReturn(None)

    self.mox.ReplayAll()
    b.put()
    self.mox.VerifyAll()
Test put().
dataset/ETHPy150Open google/simian/src/tests/simian/mac/models/base_test.py/ModelsModuleTest.testPut