# HG changeset patch # User Jérémy Bobbio # Date 1560962618 -7200 # Node ID da36da3f89f1c994614c257450f22346afd99ad4 # Parent 42afaaf708d84e509260d2e018ee61751f15a0d6 [tests] Use 16 bytes key when testing Blowfish The version of Cryptodome currently in Debian only accepts Blowfish keys with at least 5 bytes. This is a bug (it should accept 4 as it did before) that has since been fixed upstream: https://github.com/Legrandin/pycryptodome/commit/93912230f3c39e09f4038cb17e301468687c6538 So we work around this issue by using a 16 bytes key instead (which happens to be the minimum recommended length). diff -r 42afaaf708d8 -r da36da3f89f1 cubicweb/test/unittest_crypto.py --- a/cubicweb/test/unittest_crypto.py Tue Jul 09 14:35:44 2019 +0200 +++ b/cubicweb/test/unittest_crypto.py Wed Jun 19 18:43:38 2019 +0200 @@ -7,7 +7,7 @@ def test_encrypt_decrypt_roundtrip(self): data = {'a': u'ah', 'b': [1, 2]} - seed = 'ssss' + seed = 's' * 16 crypted = crypto.encrypt(data, seed) decrypted = crypto.decrypt(crypted, seed) self.assertEqual(decrypted, data)