mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
23 lines
548 B
Python
23 lines
548 B
Python
import unittest
|
|
import opendht as dht
|
|
|
|
class OpenDhtTester(unittest.TestCase):
|
|
|
|
# test that DhtRunner can be instatiated and deleted without throwing
|
|
def test_instance(self):
|
|
for i in range(10):
|
|
r = dht.DhtRunner()
|
|
r.run()
|
|
del r
|
|
|
|
# test that bootstraping works (raw address)
|
|
def test_bootstrap(self):
|
|
a = dht.DhtRunner()
|
|
a.run()
|
|
b = dht.DhtRunner()
|
|
b.run()
|
|
self.assertTrue(b.bootstrap(a.getBound()))
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|