Hello! We are running our annual fundraising. Please consider making a donation if you value this freely available service or want to support people around the world working towards liberatory social change. https://riseup.net/donate.

Commit a2e29d8b authored by drebs's avatar drebs
Browse files

[refactor] remove syncable property from shared db

parent 67fc01d1
Pipeline #2080 passed with stages
in 9 minutes and 46 seconds
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment