def setUp(self): client = OrbitDbAPI(base_url=base_url, use_db_cache=False) self.kevalue_test = client.db('keyvalue_test', json={ 'create': True, 'type': 'keyvalue' })
def setUp(self): self.client = OrbitDbAPI(base_url=base_url) self.kevalue_test = self.client.db('keyvalue_test', json={ 'create': True, 'type': 'keyvalue' })
def setUp(self): client = OrbitDbAPI(base_url=base_url) self.counter_test = client.db('counter_test', json={ 'create': True, 'type': 'counter' })
def setUp(self): client = OrbitDbAPI(base_url=base_url, use_db_cache=False) self.docstore_test = client.db('docstore_test', json={ 'create': True, 'type': 'docstore' })
def setUp(self): client = OrbitDbAPI(base_url=base_url) self.kevalue_test = client.db('keyvalue_test', json={ 'create': True, 'type': 'keyvalue' }) self.feed_test = client.db('feed_test', json={ 'create': True, 'type': 'feed' }) self.event_test = client.db('event_test', json={ 'create': True, 'type': 'eventlog' }) self.docstore_test = client.db('docstore_test', json={ 'create': True, 'type': 'docstore' }) self.counter_test = client.db('counter_test', json={ 'create': True, 'type': 'counter' })
class SearchesTestCase(unittest.TestCase): def setUp(self): self.client = OrbitDbAPI(base_url=base_url) self.kevalue_test = self.client.db('keyvalue_test', json={ 'create': True, 'type': 'keyvalue' }) def runTest(self): self.kevalue_test.findPeers() searches = self.client.searches() self.assertGreater(len(searches), 0) self.assertGreater( len([ s for s in searches if s.get('searchID') == self.kevalue_test.id ]), 0) def tearDown(self): self.kevalue_test.unload()
class SearchPeersTestCase(unittest.TestCase): def setUp(self): self.client = OrbitDbAPI(base_url=base_url) self.kevalue_test = self.client.db( 'zdpuAuSAkDDRm9KTciShAcph2epSZsNmfPeLQmxw6b5mdLmq5/keyvalue_test') def runTest(self): self.kevalue_test.findPeers(useCustomFindProvs=True) dbPeers = [] count = 0 while len(dbPeers) < 1: sleep(5) dbPeers = self.kevalue_test.getPeers() if count > 60: break self.assertGreater(len(dbPeers), 0)
def setUp(self): self.client = OrbitDbAPI(base_url=base_url) self.kevalue_test = self.client.db( 'zdpuAuSAkDDRm9KTciShAcph2epSZsNmfPeLQmxw6b5mdLmq5/keyvalue_test')