Пример #1
0
 def test_get_transaction_by_id_invalid(self):
     assert BlockchairAPI.get_transaction_by_id(TX_INVALID) == None
Пример #2
0
 def test_get_transaction_by_id_test_valid(self):
     tx = BlockchairAPI.get_transaction_by_id_testnet(TEST_TX_VALID)
     assert calc_txid(tx) == TEST_TX_VALID
Пример #3
0
 def test_get_transactions_test_unused(self):
     assert len(
         BlockchairAPI.get_transactions_testnet(TEST_ADDRESS_UNUSED)) == 0
Пример #4
0
 def test_get_transaction_by_id_valid(self):
     tx = BlockchairAPI.get_transaction_by_id(MAIN_TX_VALID)
     assert calc_txid(tx) == MAIN_TX_VALID
Пример #5
0
 def test_get_transactions_main_unused(self):
     assert len(BlockchairAPI.get_transactions(MAIN_ADDRESS_UNUSED)) == 0
Пример #6
0
 def test_get_transactions_test_used(self):
     assert len(
         BlockchairAPI.get_transactions_testnet(TEST_ADDRESS_USED2)) >= 444
Пример #7
0
 def test_get_transactions_main_used(self):
     assert len(BlockchairAPI.get_transactions(MAIN_ADDRESS_USED1)) >= 236
Пример #8
0
 def test_get_transactions_return_type(self):
     assert iter(BlockchairAPI.get_transactions(MAIN_ADDRESS_USED1))
Пример #9
0
 def test_get_balance_test_unused(self):
     assert BlockchairAPI.get_balance_testnet(TEST_ADDRESS_UNUSED) == 0
Пример #10
0
 def test_get_balance_main_unused(self):
     assert BlockchairAPI.get_balance(MAIN_ADDRESS_UNUSED) == 0
Пример #11
0
 def test_get_balance_return_type(self):
     assert isinstance(BlockchairAPI.get_balance(MAIN_ADDRESS_USED1), int)