summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2017-03-09 17:28:22 -0300
committerTulio Casagrande <tcasagra@thoughtworks.com>2017-03-09 17:28:22 -0300
commitc1966cd7cfa27445f2a09501709dc66a18d79058 (patch)
treec7e8df77410d5261c6e8ed55cdd1f5e9f1cbc1ee /testing
parent32c6d2eae998ceec302995e52c70a0636ca1e463 (diff)
[bug] add default version when decrypting secrets
Resolves: https://0xacab.org/leap/soledad/issues/8788
Diffstat (limited to 'testing')
-rw-r--r--testing/tests/client/test_secrets.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/testing/tests/client/test_secrets.py b/testing/tests/client/test_secrets.py
index 18ff458b..7c909bcb 100644
--- a/testing/tests/client/test_secrets.py
+++ b/testing/tests/client/test_secrets.py
@@ -157,3 +157,9 @@ class SecretsCryptoTestCase(unittest.TestCase):
encrypted = self.ENCRYPTED_V1
decrypted = self._crypto.decrypt(encrypted)
self.assertEqual(decrypted, self.SECRETS)
+
+ def test__decrypt_v1_without_version_field(self):
+ encrypted = dict(self.ENCRYPTED_V1)
+ del encrypted['version']
+ decrypted = self._crypto.decrypt(encrypted)
+ self.assertEqual(decrypted, self.SECRETS)