Example #1
0
 def test_testnet_pay2sh(self):
     with pytest.raises(ValueError):
         get_version(BITCOIN_ADDRESS_TEST_PAY2SH)
Example #2
0
 def test_invalid(self):
     with pytest.raises(ValueError):
         get_version('dg2dNAjuezub6iJVPNML5pW5ZQvtA9ocL')
Example #3
0
 def test_testnet(self):
     assert get_version(BITCOIN_ADDRESS_TEST) == 'test'
     assert get_version(BITCOIN_ADDRESS_TEST_COMPRESSED) == 'test'
Example #4
0
 def test_mainnet(self):
     assert get_version(BITCOIN_ADDRESS) == 'main'
     assert get_version(BITCOIN_ADDRESS_COMPRESSED) == 'main'
Example #5
0
 def test_mainnet_pay2sh(self):
     with pytest.raises(ValueError):
         get_version(BITCOIN_CASHADDRESS_PAY2SH)
Example #6
0
 def test_invalid(self):
     with pytest.raises(InvalidAddress):
         get_version('dg2dNAjuezub6iJVPNML5pW5ZQvtA9ocL')