'Checks the returned hashes.'

def CheckFilesHashed(self, fnames):

    for fname in fnames:
        try:
            file_hashes = self.EXPECTED_HASHES[fname]
        except KeyError:
            raise RuntimeError(("Can't    check    unexpected    result    for    correct    hashes:    %s" % fname))
        fd = aff4.FACTORY.Open(self.FileNameToURN(fname), token=self.token)
        hash_obj = fd.Get(fd.Schema.HASH)
        self.assertEqual(str(hash_obj.sha1), file_hashes[0])
        self.assertEqual(str(hash_obj.md5), file_hashes[1])
        self.assertEqual(str(hash_obj.sha256), file_hashes[2])
