Exemplo n.º 1
0
 def test_get_transactions_return_type(self):
     assert iter(
         BitcoinDotComAPI.get_transactions(MAIN_ADDRESS_USED1,
                                           network="mainnet"))
Exemplo n.º 2
0
 def test_get_transactions_main_unused(self):
     assert (len(
         BitcoinDotComAPI.get_transactions(MAIN_ADDRESS_UNUSED,
                                           network="mainnet")) == 0)
Exemplo n.º 3
0
 def test_get_unspent_test_unused(self):
     assert (len(
         BitcoinDotComAPI.get_unspent(TEST_ADDRESS_UNUSED,
                                      network="testnet")) == 0)
Exemplo n.º 4
0
 def test_get_transaction_testnet(self):
     assert len(str(BitcoinDotComAPI.get_transaction_testnet(TEST_TX2))) >= 156
Exemplo n.º 5
0
 def test_get_raw_transaction(self):
     assert (BitcoinDotComAPI.get_raw_transaction(
         MAIN_TX, network="mainnet")["txid"] == MAIN_TX)
Exemplo n.º 6
0
 def test_get_transaction_testnet(self):
     assert (len(
         str(BitcoinDotComAPI.get_transaction(TEST_TX2, network="testnet")))
             >= 156)
Exemplo n.º 7
0
 def test_get_unspent_test_used(self):
     assert len(
         BitcoinDotComAPI.get_unspent_testnet(TEST_ADDRESS_USED2)) >= 194
Exemplo n.º 8
0
 def test_get_unspent_return_type(self):
     assert iter(
         BitcoinDotComAPI.get_unspent(MAIN_ADDRESS_USED1,
                                      network="mainnet"))
Exemplo n.º 9
0
 def test_get_transactions_test_used(self):
     assert len(
         BitcoinDotComAPI.get_transactions_testnet(
             TEST_ADDRESS_USED2)) >= 444
Exemplo n.º 10
0
 def test_get_unspent_main_unused(self):
     assert len(BitcoinDotComAPI.get_unspent(MAIN_ADDRESS_UNUSED)) == 0
Exemplo n.º 11
0
 def test_get_transactions_main_unused(self):
     assert len(BitcoinDotComAPI.get_transactions(MAIN_ADDRESS_UNUSED)) == 0
Exemplo n.º 12
0
 def test_get_balance_test_used(self):
     assert BitcoinDotComAPI.get_balance_testnet(TEST_ADDRESS_USED2) > 0
Exemplo n.º 13
0
 def test_get_balance_main_used(self):
     assert BitcoinDotComAPI.get_balance(MAIN_ADDRESS_USED1) > 0
Exemplo n.º 14
0
 def test_get_transaction(self):
     assert (len(
         str(BitcoinDotComAPI.get_transaction(MAIN_TX, network="mainnet")))
             >= 156)
Exemplo n.º 15
0
 def test_get_unspent_test_unused(self):
     assert len(
         BitcoinDotComAPI.get_unspent_testnet(TEST_ADDRESS_UNUSED)) == 0
Exemplo n.º 16
0
 def test_get_tx_amount(self):
     assert BitcoinDotComAPI.get_tx_amount(MAIN_TX2, 1,
                                           network="mainnet") == 546
Exemplo n.º 17
0
 def test_get_raw_transaction(self):
     assert BitcoinDotComAPI.get_raw_transaction(MAIN_TX)['txid'] == MAIN_TX
Exemplo n.º 18
0
 def test_get_unspent_main_unused(self):
     assert (len(
         BitcoinDotComAPI.get_unspent(MAIN_ADDRESS_UNUSED,
                                      network="mainnet")) == 0)
Exemplo n.º 19
0
 def test_get_raw_transaction_testnet(self):
     assert BitcoinDotComAPI.get_raw_transaction_testnet(
         TEST_TX)['txid'] == TEST_TX
Exemplo n.º 20
0
 def test_get_balance_test_unused(self):
     assert BitcoinDotComAPI.get_balance(TEST_ADDRESS_UNUSED,
                                         network="testnet") == 0
Exemplo n.º 21
0
 def test_get_balance_return_type(self):
     assert isinstance(
         BitcoinDotComAPI.get_balance(MAIN_ADDRESS_USED1,
                                      network="mainnet"), int)
Exemplo n.º 22
0
 def test_get_transactions_test_used(self):
     assert (len(
         BitcoinDotComAPI.get_transactions(TEST_ADDRESS_USED2,
                                           network="testnet")) >= 444)
Exemplo n.º 23
0
 def test_get_balance_main_unused(self):
     assert BitcoinDotComAPI.get_balance(MAIN_ADDRESS_UNUSED,
                                         network="mainnet") == 0
Exemplo n.º 24
0
 def test_get_raw_transaction_testnet(self):
     assert (BitcoinDotComAPI.get_raw_transaction(
         TEST_TX, network="testnet")["txid"] == TEST_TX)
Exemplo n.º 25
0
 def test_get_transaction(self):
     assert len(str(BitcoinDotComAPI.get_transaction(MAIN_TX))) >= 156