Convert tests to Python 3

Fix #938
This commit is contained in:
Lorenzo Bolla
2022-01-27 11:35:35 +01:00
parent a40cfc679c
commit 035d5314b0
27 changed files with 241 additions and 284 deletions
+2 -2
View File
@@ -82,7 +82,7 @@ class PublishUpdate1Test(BaseTest):
else:
h = hashlib.sha512()
h.update(self.read_file(os.path.join('public/dists/maverick', path)))
h.update(self.read_file(os.path.join('public/dists/maverick', path), mode='b'))
if h.hexdigest() != fileHash:
raise Exception("file hash doesn't match for %s: %s != %s" % (path, fileHash, h.hexdigest()))
@@ -427,7 +427,7 @@ class PublishUpdate12Test(BaseTest):
else:
h = hashlib.sha512()
h.update(self.read_file(os.path.join('public/dists/maverick', path)))
h.update(self.read_file(os.path.join('public/dists/maverick', path), mode='b'))
if h.hexdigest() != fileHash:
raise Exception("file hash doesn't match for %s: %s != %s" % (path, fileHash, h.hexdigest()))