예제 #1
0
 def test_get_unspent_test_used(self):
     assert len(BitpayAPI.get_unspent_testnet(TEST_ADDRESS_USED2)) >= 194
예제 #2
0
 def test_get_unspent_test_unused(self):
     assert len(BitpayAPI.get_unspent_testnet(TEST_ADDRESS_UNUSED)) == 0
예제 #3
0
 def test_get_unspent_return_type(self):
     assert iter(BitpayAPI.get_unspent(MAIN_ADDRESS_USED1))
예제 #4
0
 def test_get_unspent_main_unused(self):
     assert len(BitpayAPI.get_unspent(MAIN_ADDRESS_UNUSED)) == 0
예제 #5
0
 def test_get_transaction_by_id_test_valid(self):
     tx = BitpayAPI.get_transaction_by_id_testnet(TEST_TX_VALID)
     assert calc_txid(tx) == TEST_TX_VALID
예제 #6
0
 def test_get_transaction_by_id_test_invalid(self):
     assert BitpayAPI.get_transaction_by_id_testnet(TX_INVALID) == None
예제 #7
0
 def test_get_transactions_test_unused(self):
     assert len(BitpayAPI.get_transactions_testnet(TEST_ADDRESS_UNUSED)) == 0
예제 #8
0
 def test_get_transaction_by_id_valid(self):
     tx = BitpayAPI.get_transaction_by_id(MAIN_TX_VALID)
     assert calc_txid(tx) == MAIN_TX_VALID
예제 #9
0
 def test_get_transactions_main_unused(self):
     assert len(BitpayAPI.get_transactions(MAIN_ADDRESS_UNUSED)) == 0
예제 #10
0
 def test_get_transactions_test_used(self):
     assert len(BitpayAPI.get_transactions_testnet(TEST_ADDRESS_USED2)) >= 444
예제 #11
0
 def test_get_transactions_main_used(self):
     assert len(BitpayAPI.get_transactions(MAIN_ADDRESS_USED1)) >= 218
예제 #12
0
 def test_get_transactions_return_type(self):
     assert iter(BitpayAPI.get_transactions(MAIN_ADDRESS_USED1))
예제 #13
0
 def test_get_balance_test_unused(self):
     assert BitpayAPI.get_balance_testnet(TEST_ADDRESS_UNUSED) == 0
예제 #14
0
 def test_get_balance_main_unused(self):
     assert BitpayAPI.get_balance(MAIN_ADDRESS_UNUSED) == 0
예제 #15
0
 def test_get_balance_return_type(self):
     assert isinstance(BitpayAPI.get_balance(MAIN_ADDRESS_USED1), int)