1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-03 17:50:11 +02:00

metadata test: load pickle in bytes, not str

This commit is contained in:
Daniel Martí 2016-01-04 21:22:06 +01:00
parent 4e28fa78fc
commit 5c40e3ab99

View File

@ -42,7 +42,7 @@ class MetadataTest(unittest.TestCase):
savepath = os.path.join('metadata', appid + '.pickle')
frommeta = app.field_dict()
self.assertTrue(appid in apps)
with open(savepath, 'r') as f:
with open(savepath, 'rb') as f:
frompickle = pickle.load(f)
self.assertEquals(frommeta, frompickle)
# Uncomment to overwrite