Skip to content

Commit

Permalink
Remove bitaps, bitgo from some unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryp Toon committed May 5, 2024
1 parent e975baf commit 814abfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bitcoinlib/data/providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
"network": "testnet",
"client_class": "LitecoinBlockexplorerClient",
"provider_coin_id": "",
"url": "https://tbtc1.blockbook.bitaccess.net/api/v1/",
"url": "https://tbtc1.trezor.io/api/v1/",
"api_key": "",
"priority": 10,
"denominator": 100000000,
Expand Down Expand Up @@ -279,7 +279,7 @@
"network": "testnet",
"client_class": "BlockbookClient",
"provider_coin_id": "",
"url": "https://tbtc1.blockbook.bitaccess.net/api/v2/",
"url": "https://tbtc2.trezor.io/api/v2/",
"api_key": "",
"priority": 10,
"denominator": 100000000,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def test_service_network_litecoin_legacy(self):

def test_service_blockcount(self):
for nw in ['bitcoin', 'litecoin', 'testnet']:
srv = ServiceTest(min_providers=3, cache_uri='', network=nw)
srv = ServiceTest(min_providers=3, cache_uri='', network=nw, exclude_providers=['bitgo', 'bitaps'])
srv.blockcount()
n_blocks = None
for provider in srv.results:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2365,9 +2365,9 @@ def test_wallet_anti_fee_sniping(self):
w = wallet_create_or_open('antifeesnipingtestwallet', network='testnet', db_uri=self.database_uri)
w.utxo_add(w.get_key().address, 1234567, os.urandom(32).hex(), 1)
t = w.send_to('tb1qrjtz22q59e76mhumy0p586cqukatw5vcd0xvvz', 123456)
block_height = Service(network='testnet').blockcount()
block_height = Service(network='testnet', exclude_providers=['bitgo', 'bitaps']).blockcount()
# Bitaps and Bitgo return incorrect blockcount for testnet, so set delta
self.assertAlmostEqual(t.locktime, block_height+1, delta=25000)
self.assertAlmostEqual(t.locktime, block_height+1, delta=3)

w2 = wallet_create_or_open('antifeesnipingtestwallet2', network='testnet', anti_fee_sniping=True)
w2.utxo_add(w2.get_key().address, 1234567, os.urandom(32).hex(), 1)
Expand Down

0 comments on commit 814abfe

Please sign in to comment.