test: add excluded-in-CI live tests
This commit is contained in:
28
bdk-python/tests/test_live_wallet.py
Normal file
28
bdk-python/tests/test_live_wallet.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import bdkpython as bdk
|
||||
import unittest
|
||||
|
||||
class TestLiveWallet(unittest.TestCase):
|
||||
|
||||
def test_synced_balance(self):
|
||||
descriptor: bdk.Descriptor = bdk.Descriptor(
|
||||
"wpkh([c258d2e4/84h/1h/0h]tpubDDYkZojQFQjht8Tm4jsS3iuEmKjTiEGjG6KnuFNKKJb5A6ZUCUZKdvLdSDWofKi4ToRCwb9poe1XdqfUnP4jaJjCB2Zwv11ZLgSbnZSNecE/0/*)",
|
||||
bdk.Network.TESTNET
|
||||
)
|
||||
wallet: bdk.Wallet = bdk.Wallet.new_no_persist(
|
||||
descriptor,
|
||||
None,
|
||||
bdk.Network.TESTNET
|
||||
)
|
||||
esploraClient: bdk.EsploraClient = bdk.EsploraClient(url = "https://mempool.space/testnet/api")
|
||||
update = esploraClient.scan(
|
||||
wallet = wallet,
|
||||
stop_gap = 10,
|
||||
parallel_requests = 1
|
||||
)
|
||||
wallet.apply_update(update)
|
||||
|
||||
self.assertGreater(wallet.get_balance().total(), 0)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user