From a2e29d8bebbe7809dc10195982a205ed3709459c Mon Sep 17 00:00:00 2001 From: drebs Date: Thu, 23 Feb 2017 19:08:02 -0300 Subject: [refactor] remove syncable property from shared db --- client/src/leap/soledad/client/shared_db.py | 15 +-------------- testing/test_soledad/util.py | 1 - 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/client/src/leap/soledad/client/shared_db.py b/client/src/leap/soledad/client/shared_db.py index 52b226b9..b429d2cb 100644 --- a/client/src/leap/soledad/client/shared_db.py +++ b/client/src/leap/soledad/client/shared_db.py @@ -55,10 +55,6 @@ class SoledadSharedDatabase(HTTPDatabase, TokenBasedAuth): # TODO: prevent client from messing with the shared DB. # TODO: define and document API. - # If syncable is False, the database will not attempt to sync against - # a remote replica. Default is True. - syncable = True - # # Token auth methods. # @@ -95,7 +91,7 @@ class SoledadSharedDatabase(HTTPDatabase, TokenBasedAuth): # @staticmethod - def open_database(url, uuid, creds=None, syncable=True): + def open_database(url, uuid, creds=None): """ Open a Soledad shared database. @@ -106,20 +102,11 @@ class SoledadSharedDatabase(HTTPDatabase, TokenBasedAuth): :param creds: A tuple containing the authentication method and credentials. :type creds: tuple - :param syncable: - If syncable is False, the database will not attempt to sync against - a remote replica. - :type syncable: bool :return: The shared database in the given url. :rtype: SoledadSharedDatabase """ - # XXX fix below, doesn't work with tests. - # if syncable and not url.startswith('https://'): - # raise ImproperlyConfiguredError( - # "Remote soledad server must be an https URI") db = SoledadSharedDatabase(url, uuid, creds=creds) - db.syncable = syncable return db @staticmethod diff --git a/testing/test_soledad/util.py b/testing/test_soledad/util.py index e44a165d..83a27016 100644 --- a/testing/test_soledad/util.py +++ b/testing/test_soledad/util.py @@ -180,7 +180,6 @@ class MockedSharedDBTest(object): put_doc = Mock(side_effect=put_doc_side_effect) open = Mock(return_value=None) close = Mock(return_value=None) - syncable = True def __call__(self): return self -- cgit v1.2.3