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