From ce322fe3c12af877f9d7d40a6a3ccc4001fdf2b6 Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 6 Feb 2013 20:01:31 -0200 Subject: Add DatabaseSyncTargetTests to SQLCipher tests. --- tests/test_sqlcipher.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests') diff --git a/tests/test_sqlcipher.py b/tests/test_sqlcipher.py index 85b9e486..042ee4ff 100644 --- a/tests/test_sqlcipher.py +++ b/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 #----------------------------------------------------------------------------- -- cgit v1.2.3