mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-04 02:00:11 +02:00
metadata test: load pickle in bytes, not str
This commit is contained in:
parent
4e28fa78fc
commit
5c40e3ab99
@ -42,7 +42,7 @@ class MetadataTest(unittest.TestCase):
|
|||||||
savepath = os.path.join('metadata', appid + '.pickle')
|
savepath = os.path.join('metadata', appid + '.pickle')
|
||||||
frommeta = app.field_dict()
|
frommeta = app.field_dict()
|
||||||
self.assertTrue(appid in apps)
|
self.assertTrue(appid in apps)
|
||||||
with open(savepath, 'r') as f:
|
with open(savepath, 'rb') as f:
|
||||||
frompickle = pickle.load(f)
|
frompickle = pickle.load(f)
|
||||||
self.assertEquals(frommeta, frompickle)
|
self.assertEquals(frommeta, frompickle)
|
||||||
# Uncomment to overwrite
|
# Uncomment to overwrite
|
||||||
|
Loading…
Reference in New Issue
Block a user