def test_can_verify_if_path_exists_for_unicode_path(self): storage = Storage(self.context) key = u'/some/path/to/téste.jpg' expect(storage.exists(key).result()).to_be_false() self.memcached.set(storage.key_for(key), 'test-data') expect(storage.exists(key).result()).to_be_true()
def test_can_remove_from_storage(self): storage = Storage(self.context) key = '/some/path/to/file.jpg' # does not fail even if key not found storage.remove(key) expect(storage.exists(key).result()).to_be_false() self.memcached.set(storage.key_for(key), 'test-data') storage.remove(key) expect(storage.exists(key).result()).to_be_false()