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))
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) )
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))
def setUp(self): self.cache = cache.EmoticonCache("tmp", "*****@*****.**") self.image_path = testutils.create_binary_file(self.cache.path)
def setUp(self): self.cache = cache.EmoticonCache('tmp', '*****@*****.**') self.image_path = testutils.create_binary_file(self.cache.path)
def setUp(self): self.cache = cache.AvatarCache('tmp', '*****@*****.**') self.image_path = testutils.create_binary_file(self.cache.path)