예제 #1
0
 def test_testnet_pay2sh(self):
     with pytest.raises(ValueError):
         get_prefix(BITCOIN_ADDRESS_TEST_PAY2SH)
예제 #2
0
 def test_testnet(self):
     assert get_prefix(BITCOIN_ADDRESS_TEST) == 'test'
     assert get_prefix(BITCOIN_ADDRESS_TEST_COMPRESSED) == 'test'
예제 #3
0
 def test_invalid(self):
     with pytest.raises(ValueError):
         get_prefix('dg2dNAjuezub6iJVPNML5pW5ZQvtA9ocL')
예제 #4
0
 def test_mainnet(self):
     assert get_prefix(BITCOIN_ADDRESS) == 'main'
     assert get_prefix(BITCOIN_ADDRESS_COMPRESSED) == 'main'