summaryrefslogtreecommitdiff
path: root/src/leap/soledad
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-02-06 20:01:31 -0200
committerdrebs <drebs@leap.se>2013-02-06 20:01:31 -0200
commit634f82d95984b4bb78cbfdd52e6e75116c8df53d (patch)
tree2971e35b0ba808eb4f55f5fc8a6741dd92b31cb7 /src/leap/soledad
parentc1289d25f25814e1b34bb1ccf3e55b809d0c5f96 (diff)
Add DatabaseSyncTargetTests to SQLCipher tests.
Diffstat (limited to 'src/leap/soledad')
-rw-r--r--src/leap/soledad/tests/test_sqlcipher.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/leap/soledad/tests/test_sqlcipher.py b/src/leap/soledad/tests/test_sqlcipher.py
index 85b9e486..042ee4ff 100644
--- a/src/leap/soledad/tests/test_sqlcipher.py
+++ b/src/leap/soledad/tests/test_sqlcipher.py
@@ -361,6 +361,26 @@ class SQLCipherDatabaseSyncTests(test_sync.DatabaseSyncTests):
scenarios = sync_scenarios
+def _make_local_db_and_leap_target(test, path='test'):
+ test.startServer()
+ db = test.request_state._create_database(os.path.basename(path))
+ st = LeapSyncTarget.connect(test.getURL(path))
+ return db, st
+
+
+target_scenarios = [
+ ('leap', {
+ 'create_db_and_target': _make_local_db_and_leap_target,
+ 'make_app_with_state': tests.test_remote_sync_target.make_http_app}),
+]
+
+
+class SQLCipherSyncTargetTests(test_sync.DatabaseSyncTargetTests):
+
+ scenarios = (tests.multiply_scenarios(SQLCIPHER_SCENARIOS,
+ target_scenarios))
+
+
#-----------------------------------------------------------------------------
# Tests for actual encryption of the database
#-----------------------------------------------------------------------------