Esempio n. 1
0
 def test_remove(self):
     new_image_path = testutils.create_binary_file(self.cache.path)
     stamp, hash_ = self.cache.insert(new_image_path)
     self.assertTrue(self.cache.remove(hash_), 'remove should return True')
     items = self.cache.list()
     self.assertTrue((stamp, hash_) not in items,
             str((stamp, hash_)) + ' should not be in cache.list(): ' + str(items))
Esempio n. 2
0
 def test_remove(self):
     new_image_path = testutils.create_binary_file(self.cache.path)
     emoticon, hash_ = self.cache.insert(("O.o", new_image_path))
     self.assertTrue(self.cache.remove(hash_), "remove should return True")
     items = self.cache.list()
     self.assertTrue(
         (emoticon, hash_) not in items, str((emoticon, hash_)) + " should not be in cache.list(): " + str(items)
     )
Esempio n. 3
0
 def test_remove(self):
     new_image_path = testutils.create_binary_file(self.cache.path)
     emoticon, hash_ = self.cache.insert(('O.o', new_image_path))
     self.assertTrue(self.cache.remove(hash_), 'remove should return True')
     items = self.cache.list()
     self.assertTrue((emoticon, hash_) not in items,
                     str((emoticon, hash_)) +
                     ' should not be in cache.list(): ' + str(items))
Esempio n. 4
0
 def setUp(self):
     self.cache = cache.EmoticonCache("tmp", "*****@*****.**")
     self.image_path = testutils.create_binary_file(self.cache.path)
Esempio n. 5
0
 def setUp(self):
     self.cache = cache.EmoticonCache('tmp', '*****@*****.**')
     self.image_path = testutils.create_binary_file(self.cache.path)
Esempio n. 6
0
 def setUp(self):
     self.cache = cache.AvatarCache('tmp', '*****@*****.**')
     self.image_path = testutils.create_binary_file(self.cache.path)