Example #1
0
 def test_flush(self):
     bitcache = BitCache()
     cache = "100" * 100
     bitcache.push(cache)
     bitcache.flush()
     assert bitcache.size == 0 and bitcache.dump() == ""
Example #2
0
 def test_dump(self):
     bitcache = BitCache()
     cache = "100" * 100
     bitcache.push(cache)
     assert bitcache.dump() == cache