def do_sync(self): """ Perform sync using SoledadSynchronizer, SoledadSyncTarget and Token auth. """ target = soledad_sync_target( self, self.db2._dbname, source_replica_uid=self._soledad._dbpool.replica_uid) return sync.SoledadSynchronizer(self.db, target).sync()
def do_sync(self): """ Perform sync using SoledadSynchronizer, SoledadSyncTarget and Token auth. """ target = soledad_sync_target( self, self.db2._dbname, source_replica_uid=self._soledad._dbpool.replica_uid) self.addCleanup(target.close) return sync.SoledadSynchronizer(self.db, target).sync(defer_decryption=False)
def do_sync(self, target_name): """ Perform sync using SoledadSynchronizer, SoledadSyncTarget and Token auth. """ replica_uid = self._soledad._dbpool.replica_uid sync_db = self._soledad._sync_db sync_enc_pool = self._soledad._sync_enc_pool target = soledad_sync_target(self, target_name, source_replica_uid=replica_uid, sync_db=sync_db, sync_enc_pool=sync_enc_pool) self.addCleanup(target.close) return sync.SoledadSynchronizer(self.db1, target).sync(defer_decryption=True)
def do_sync(self, target_name): """ Perform sync using SoledadSynchronizer, SoledadSyncTarget and Token auth. """ extra = {} extra = dict(creds={'token': { 'uuid': 'user-uuid', 'token': 'auth-token', }}) target_url = self.getURL(target_name) return sync.SoledadSynchronizer( self.db, target.SoledadSyncTarget( target_url, crypto=self._soledad._crypto, **extra)).sync(autocreate=True, defer_decryption=False)
def setUp(self): BaseSoledadTest.setUp(self) self.db = Mock() self.target = Mock() self.synchronizer = sync.SoledadSynchronizer(self.db, self.target)