diff options
author | drebs <drebs@leap.se> | 2013-02-06 18:01:58 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-02-06 18:03:44 -0200 |
commit | 4a0ecb6832f28453976757fe4a7c4a5f1f811105 (patch) | |
tree | 4294644a391cf534027cb83cb95bec56758b9672 /src/leap/soledad/tests/test_sqlcipher.py | |
parent | 6328511e86429bcd23f6ca179ef10114aa69a4e9 (diff) |
SQLCipher syncs using LeapSyncTarget.
Diffstat (limited to 'src/leap/soledad/tests/test_sqlcipher.py')
-rw-r--r-- | src/leap/soledad/tests/test_sqlcipher.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/leap/soledad/tests/test_sqlcipher.py b/src/leap/soledad/tests/test_sqlcipher.py index 0d5d00ee..b964f51e 100644 --- a/src/leap/soledad/tests/test_sqlcipher.py +++ b/src/leap/soledad/tests/test_sqlcipher.py @@ -27,6 +27,7 @@ from leap.soledad.tests import u1db_tests as tests from leap.soledad.tests.u1db_tests import test_sqlite_backend from leap.soledad.tests.u1db_tests import test_backends from leap.soledad.tests.u1db_tests import test_open +from leap.soledad.tests.u1db_tests import test_sync PASSWORD = '123456' @@ -322,6 +323,23 @@ class SQLCipherOpen(test_open.TestU1DBOpen): #----------------------------------------------------------------------------- +# The following tests come from `u1db.tests.test_sync`. +#----------------------------------------------------------------------------- + +sync_scenarios = [] +for name, scenario in SQLCIPHER_SCENARIOS: + scenario = dict(scenario) + scenario['do_sync'] = test_sync.sync_via_synchronizer + sync_scenarios.append((name, scenario)) + scenario = dict(scenario) + + +class SQLCipherDatabaseSyncTests(test_sync.DatabaseSyncTests): + + scenarios = sync_scenarios + + +#----------------------------------------------------------------------------- # Tests for actual encryption of the database #----------------------------------------------------------------------------- @@ -373,4 +391,5 @@ class SQLCipherEncryptionTest(unittest.TestCase): except DatabaseIsNotEncrypted: pass + load_tests = tests.load_with_scenarios |