summaryrefslogtreecommitdiff
path: root/src/leap/soledad/tests/test_crypto.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-05-21 21:41:11 -0300
committerdrebs <drebs@leap.se>2013-05-21 21:44:14 -0300
commit3214e542c7e5ebaadd704c17f2a34858b7b8e92e (patch)
tree16ac207b7e8c813a7f1dbcfd541a2507ca4ca691 /src/leap/soledad/tests/test_crypto.py
parent6c1b204938109de29fa53cc4e445b822f622826d (diff)
Improve export/import_recovery_document()
* Fix docstrings.
Diffstat (limited to 'src/leap/soledad/tests/test_crypto.py')
-rw-r--r--src/leap/soledad/tests/test_crypto.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/leap/soledad/tests/test_crypto.py b/src/leap/soledad/tests/test_crypto.py
index 7b8f756a..a61b931c 100644
--- a/src/leap/soledad/tests/test_crypto.py
+++ b/src/leap/soledad/tests/test_crypto.py
@@ -180,7 +180,7 @@ class EncryptedSyncTestCase(BaseSoledadTest):
class RecoveryDocumentTestCase(BaseSoledadTest):
def test_export_recovery_document_raw(self):
- rd = json.loads(self._soledad.export_recovery_document())
+ rd = self._soledad.export_recovery_document()
secret_id = rd[self._soledad.STORAGE_SECRETS_KEY].items()[0][0]
secret = rd[self._soledad.STORAGE_SECRETS_KEY][secret_id]
self.assertEqual(secret_id, self._soledad._secret_id)
@@ -191,7 +191,7 @@ class RecoveryDocumentTestCase(BaseSoledadTest):
self.assertTrue(self._soledad.SECRET_KEY in secret)
def test_import_recovery_document(self):
- rd = self._soledad.export_recovery_document(None)
+ rd = self._soledad.export_recovery_document()
s = self._soledad_instance(user='anotheruser@leap.se', prefix='/2')
s.import_recovery_document(rd)
s._set_secret_id(self._soledad._secret_id)
@@ -238,7 +238,7 @@ class CryptoMethodsTestCase(BaseSoledadTest):
def test__has_secret(self):
- sol = self._soledad_instance(user='user@leap.se', prefix='/3')
+ sol = self._soledad_instance(user='user@leap.se', prefix='/4')
self.assertTrue(sol._has_secret(), "Should have a secret at "
"this point")
# setting secret id to None should not interfere in the fact we have a