Exemple #1
0
 def testCacheClear(self):
     cache = Cache('simple')
     d = {}
     [d.setdefault(str(x), x) for x in range(100)]
     cache.setMany(d)
     keys = [str(x) for x in range(100)]
     rv = cache.getMany(*keys)
     self.assert_(None not in rv)
     cache.clear()
     flg = True
     for x in cache.getMany(*keys):
         if x is not None:
             flg = False
             break
     self.assert_(flg)