def setUp(self): input = "A test string\n" self.md5 = "0035e1010ea5e875c8776c69dd0ee03e" self.sha1 = "f5c13d47495264cfa13f6d46ec52e7ad42474e53" hashers = [ hashlib.md5(), hashlib.sha1() ] self.input = StringIO.StringIO(input) self.digests = file_index.hashes (self.input, hashers)
def setUp(self): in_file= open("tests/data/dir1/test_file_1") self.md5 = "0035e1010ea5e875c8776c69dd0ee03e" self.sha1 = "f5c13d47495264cfa13f6d46ec52e7ad42474e53" hashers = [ hashlib.md5(), hashlib.sha1() ] self.digests = file_index.hashes(in_file, hashers)