diff options
author | drebs <drebs@leap.se> | 2013-01-20 11:56:08 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-01-20 11:56:08 -0200 |
commit | 1af1eb0c413192d2919d4e344304bc617bfae2a5 (patch) | |
tree | 3a39ece1c4438a7526a1e71ec5e143ece3c297a9 /src/leap | |
parent | 69173d511a99126fe6508d87e8a25a60d3f1f927 (diff) |
Remove c_backend_wrapper commented code from test_sync.
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/soledad/tests/u1db_tests/test_sync.py | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/leap/soledad/tests/u1db_tests/test_sync.py b/src/leap/soledad/tests/u1db_tests/test_sync.py index 7140cfd3..551826b6 100644 --- a/src/leap/soledad/tests/u1db_tests/test_sync.py +++ b/src/leap/soledad/tests/u1db_tests/test_sync.py @@ -57,14 +57,6 @@ def _make_local_db_and_http_target(test, path='test'): return db, st -def _make_c_db_and_c_http_target(test, path='test'): - test.startServer() - db = test.request_state._create_database(os.path.basename(path)) - url = test.getURL(path) - st = tests.c_backend_wrapper.create_http_sync_target(url) - return db, st - - def _make_local_db_and_oauth_http_target(test): db, st = _make_local_db_and_http_target(test, '~/test') st.set_oauth_credentials(tests.consumer1.key, tests.consumer1.secret, @@ -72,16 +64,6 @@ def _make_local_db_and_oauth_http_target(test): return db, st -def _make_c_db_and_oauth_http_target(test, path='~/test'): - test.startServer() - db = test.request_state._create_database(os.path.basename(path)) - url = test.getURL(path) - st = tests.c_backend_wrapper.create_oauth_http_sync_target(url, - tests.consumer1.key, tests.consumer1.secret, - tests.token1.key, tests.token1.secret) - return db, st - - target_scenarios = [ ('local', {'create_db_and_target': _make_local_db_and_target}), ('http', {'create_db_and_target': _make_local_db_and_http_target, @@ -91,26 +73,6 @@ target_scenarios = [ 'make_app_with_state': make_oauth_http_app}), ] -c_db_scenarios = [ - ('local,c', {'create_db_and_target': _make_local_db_and_target, - 'make_database_for_test': tests.make_c_database_for_test, - 'copy_database_for_test': tests.copy_c_database_for_test, - 'make_document_for_test': tests.make_c_document_for_test, - 'whitebox': False}), - ('http,c', {'create_db_and_target': _make_c_db_and_c_http_target, - 'make_database_for_test': tests.make_c_database_for_test, - 'copy_database_for_test': tests.copy_c_database_for_test, - 'make_document_for_test': tests.make_c_document_for_test, - 'make_app_with_state': make_http_app, - 'whitebox': False}), - ('oauth_http,c', {'create_db_and_target': _make_c_db_and_oauth_http_target, - 'make_database_for_test': tests.make_c_database_for_test, - 'copy_database_for_test': tests.copy_c_database_for_test, - 'make_document_for_test': tests.make_c_document_for_test, - 'make_app_with_state': make_oauth_http_app, - 'whitebox': False}), - ] - class DatabaseSyncTargetTests(tests.DatabaseBaseTests, tests.TestCaseWithServer): @@ -497,25 +459,6 @@ sync_scenarios.append(('pyhttp', { })) -if tests.c_backend_wrapper is not None: - # TODO: We should hook up sync tests with an HTTP target - def sync_via_c_sync(test, db_source, db_target, trace_hook=None, - trace_hook_shallow=None): - target = db_target.get_sync_target() - trace_hook = trace_hook or trace_hook_shallow - if trace_hook: - target._set_trace_hook(trace_hook) - return tests.c_backend_wrapper.sync_db_to_target(db_source, target) - - #for name, scenario in tests.C_DATABASE_SCENARIOS: - # scenario = dict(scenario) - # scenario['do_sync'] = sync_via_synchronizer - # sync_scenarios.append((name + ',pysync', scenario)) - # scenario = dict(scenario) - # scenario['do_sync'] = sync_via_c_sync - # sync_scenarios.append((name + ',csync', scenario)) - - class DatabaseSyncTests(tests.DatabaseBaseTests, tests.TestCaseWithServer): @@ -1162,20 +1105,11 @@ class TestDbSync(tests.TestCaseWithServer): 'make_app_with_state': make_http_app, 'make_database_for_test': tests.make_memory_database_for_test, }), - #('c-http', { - # 'make_app_with_state': make_http_app, - # 'make_database_for_test': tests.make_c_database_for_test - # }), ('py-oauth-http', { 'make_app_with_state': make_oauth_http_app, 'make_database_for_test': tests.make_memory_database_for_test, 'oauth': True }), - #('c-oauth-http', { - # 'make_app_with_state': make_oauth_http_app, - # 'make_database_for_test': tests.make_c_database_for_test, - # 'oauth': True - # }), ] oauth = False |