def test01StoreExpiration(self):
    s = utils.FastStore(max_size=5)
    keys = []
    for i in range(0, 100):
      keys.append(s.Put(i, i))

    # This should not raise
    s.Get(keys[-1])

    # This should raise though
    self.assertRaises(KeyError, s.Get, keys[0])
Testing store removes objects when full.
dataset/ETHPy150Open google/grr/grr/lib/utils_test.py/StoreTests.test01StoreExpiration