def testBaseModelMemcacheWrappedGetWithNonExistentPropName(self):
    prop_name = 'bad_prop'
    key_name = 'foo_key_name'
    memcache_key = 'mwgpn_%s_%s_%s' % (
        models.BaseModel.kind(), key_name, prop_name)

    self.mox.StubOutWithMock(models, 'memcache', True)
    self.mox.StubOutWithMock(models.BaseModel, 'get_by_key_name', True)
    mock_entity = object()

    self.assertFalse(hasattr(mock_entity, prop_name))
    models.memcache.get(memcache_key).AndReturn(None)
    models.BaseModel.get_by_key_name(key_name).AndReturn(mock_entity)

    self.mox.ReplayAll()
    self.assertEqual(
        None, models.BaseModel.MemcacheWrappedGet(key_name, prop_name))
    self.mox.VerifyAll()
Test BaseModel.MemcacheWrappedGet() for non-existent property.
dataset/ETHPy150Open google/simian/src/tests/simian/mac/models/base_test.py/ModelsModuleTest.testBaseModelMemcacheWrappedGetWithNonExistentPropName