def testResetModMemcache(self):
    target = 'target'
    mod_type_invalid = 'UNKNOWN'
    mod_type = models.MANIFEST_MOD_MODELS.keys()[0]
    mod_type_cls = models.MANIFEST_MOD_MODELS[mod_type]

    self.mox.StubOutWithMock(mod_type_cls, 'DeleteMemcacheWrappedGetAllFilter')
    mod_type_cls.DeleteMemcacheWrappedGetAllFilter(
        (('%s =' % mod_type, target),)).AndReturn(None)

    self.mox.ReplayAll()
    self.assertTrue(mod_type_invalid not in models.MANIFEST_MOD_MODELS)
    self.assertRaises(
        ValueError, models.BaseManifestModification.ResetModMemcache,
        mod_type_invalid, target)

    models.BaseManifestModification.ResetModMemcache(mod_type, target)
    self.mox.VerifyAll()
Test ResetModMemcache().
dataset/ETHPy150Open google/simian/src/tests/simian/mac/models/base_test.py/BaseManifestModificationTest.testResetModMemcache