summaryrefslogtreecommitdiff
path: root/src/leap/soledad/tests
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-04-30 17:41:31 -0300
committerdrebs <drebs@leap.se>2013-04-30 17:41:31 -0300
commit516a5adb4f8328bd94446f4ea7ad0bc9298d7bfb (patch)
tree7ce57bc0a824a31e519ee18cebe11e3e1918ef97 /src/leap/soledad/tests
parent1e9b0e85a5de03f399c0cf52f46458dc6e77e103 (diff)
Use uuid instead of address.
Diffstat (limited to 'src/leap/soledad/tests')
-rw-r--r--src/leap/soledad/tests/test_crypto.py14
-rw-r--r--src/leap/soledad/tests/test_soledad.py4
2 files changed, 9 insertions, 9 deletions
diff --git a/src/leap/soledad/tests/test_crypto.py b/src/leap/soledad/tests/test_crypto.py
index 322be622..abe32661 100644
--- a/src/leap/soledad/tests/test_crypto.py
+++ b/src/leap/soledad/tests/test_crypto.py
@@ -167,7 +167,7 @@ class EncryptedSyncTestCase(BaseSoledadTest):
# # setup credentials for access to soledad server
# creds = {
# 'token': {
-# 'address': 'leap@leap.se',
+# 'uuid': 'leap@leap.se',
# 'token': '1234',
# }
# }
@@ -189,7 +189,7 @@ class RecoveryDocumentTestCase(BaseSoledadTest):
rd = self._soledad.export_recovery_document(None)
self.assertEqual(
{
- self._soledad.ADDRESS_KEY: self._soledad._address,
+ self._soledad.UUID_KEY: self._soledad._uuid,
self._soledad.SYMKEY_KEY: self._soledad._symkey
},
json.loads(rd),
@@ -201,7 +201,7 @@ class RecoveryDocumentTestCase(BaseSoledadTest):
self.assertEqual(True,
self._soledad._crypto.is_encrypted_sym(rd))
data = {
- self._soledad.ADDRESS_KEY: self._soledad._address,
+ self._soledad.UUID_KEY: self._soledad._uuid,
self._soledad.SYMKEY_KEY: self._soledad._symkey,
}
raw_data = json.loads(self._soledad._crypto.decrypt_sym(
@@ -224,8 +224,8 @@ class RecoveryDocumentTestCase(BaseSoledadTest):
s._init_dirs()
s._crypto = SoledadCrypto(s)
s.import_recovery_document(rd, None)
- self.assertEqual(self._soledad._address,
- s._address, 'Failed setting user email.')
+ self.assertEqual(self._soledad._uuid,
+ s._uuid, 'Failed setting user uuid.')
self.assertEqual(self._soledad._symkey,
s._symkey,
'Failed settinng secret for symmetric encryption.')
@@ -236,8 +236,8 @@ class RecoveryDocumentTestCase(BaseSoledadTest):
s._init_dirs()
s._crypto = SoledadCrypto(s)
s.import_recovery_document(rd, '123456')
- self.assertEqual(self._soledad._address,
- s._address, 'Failed setting user email.')
+ self.assertEqual(self._soledad._uuid,
+ s._uuid, 'Failed setting user uuid.')
self.assertEqual(self._soledad._symkey,
s._symkey,
'Failed settinng secret for symmetric encryption.')
diff --git a/src/leap/soledad/tests/test_soledad.py b/src/leap/soledad/tests/test_soledad.py
index 1ce9adb7..e7d34a87 100644
--- a/src/leap/soledad/tests/test_soledad.py
+++ b/src/leap/soledad/tests/test_soledad.py
@@ -105,7 +105,7 @@ class SoledadSharedDBTestCase(BaseSoledadTest):
Ensure the shared db is queried with the correct doc_id.
"""
self._soledad._shared_db = Mock()
- doc_id = self._soledad._address_hash()
+ doc_id = self._soledad._uuid_hash()
self._soledad._fetch_keys_from_shared_db()
self.assertTrue(
self._soledad._shared_db.get_doc_unauth.assert_called_once(doc_id),
@@ -128,7 +128,7 @@ class SoledadSharedDBTestCase(BaseSoledadTest):
return self
self._soledad._shared_db = MockSharedDB()
- doc_id = self._soledad._address_hash()
+ doc_id = self._soledad._uuid_hash()
self._soledad._assert_keys_in_shared_db()
self.assertTrue(
self._soledad._shared_db().get_doc_unauth.assert_called_once_with(