def testSafeEntityDel(self):
    key_name = 'fookeyname'
    self.mox.StubOutWithMock(gae_util.logging, 'info')
    entity = self.mox.CreateMockAnything()
    entity.delete_async().AndRaise(gae_util.db.Error)
    key = self.mox.CreateMockAnything()
    entity.key().AndReturn(key)
    key.name().AndReturn(key_name)
    exc = ''
    gae_util.logging.warning((
        'Model.delete(%s) failed: %s. '
        'this entity is now probably empty.'),  key_name, str(exc))
    self.mox.ReplayAll()
    gae_util.SafeEntityDel(entity)
    self.mox.VerifyAll()
Test SafeEntityDel().
dataset/ETHPy150Open google/simian/src/tests/simian/mac/common/gae_util_test.py/GaeUtilModuleTest.testSafeEntityDel