summaryrefslogtreecommitdiff
path: root/testing/tests/sync
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2016-09-22 20:37:23 -0300
committerdrebs <drebs@leap.se>2016-12-12 09:12:00 -0200
commit781984f3485b1fd479d09278a665f599c1bd10dc (patch)
treef6777be32336283cdb8131eface1568e464d9d68 /testing/tests/sync
parent40742021a8beeb68b159456b423e4c3674f7926d (diff)
[test] fix test and remove leftovers defer_encryption
Diffstat (limited to 'testing/tests/sync')
-rw-r--r--testing/tests/sync/test_sqlcipher_sync.py4
-rw-r--r--testing/tests/sync/test_sync_target.py4
2 files changed, 2 insertions, 6 deletions
diff --git a/testing/tests/sync/test_sqlcipher_sync.py b/testing/tests/sync/test_sqlcipher_sync.py
index c3cd8444..029164eb 100644
--- a/testing/tests/sync/test_sqlcipher_sync.py
+++ b/testing/tests/sync/test_sqlcipher_sync.py
@@ -544,10 +544,6 @@ class SQLCipherDatabaseSyncTests(
self.sync(self.db2, db3)
doc3 = db3.get_doc('the-doc')
- _crypto = self._soledad._crypto
- decrypted = _crypto.decrypt_doc(doc3)
- doc3.set_json(decrypted)
-
self.assertEqual(doc4.get_json(), doc3.get_json())
self.assertFalse(doc3.has_conflicts)
self.db1.close()
diff --git a/testing/tests/sync/test_sync_target.py b/testing/tests/sync/test_sync_target.py
index 7c93cd7c..ef034142 100644
--- a/testing/tests/sync/test_sync_target.py
+++ b/testing/tests/sync/test_sync_target.py
@@ -71,7 +71,7 @@ class TestSoledadParseReceivedDocResponse(unittest.TestCase):
doc = SoledadDocument('i', rev='r')
doc.content = {'a': 'b'}
- encrypted_docstr = _crypto.SoledadCrypto('').encrypt_doc(doc)
+ encrypted_docstr = _crypto.SoledadCrypto('safe').encrypt_doc(doc)
with self.assertRaises(l2db.errors.BrokenSyncStream):
self.parse("[\r\n{},\r\n]")
@@ -589,9 +589,9 @@ class SoledadDatabaseSyncTargetTests(
[], 'other-replica', last_known_generation=0,
last_known_trans_id=None, insert_doc_cb=self.receive_doc)
self.assertTransactionLog([doc.doc_id, doc.doc_id], self.db)
+ self.assertEqual(2, new_gen)
self.assertEqual(
(doc.doc_id, doc.rev, None, 2), self.other_changes[0][:-1])
- self.assertEqual(2, new_gen)
if self.whitebox:
self.assertEqual(self.db._last_exchange_log['return'],
{'last_gen': 2, 'docs': [(doc.doc_id, doc.rev)]})