def test_testnet_pay2sh(self): with pytest.raises(ValueError): get_version(BITCOIN_ADDRESS_TEST_PAY2SH)
def test_invalid(self): with pytest.raises(ValueError): get_version('dg2dNAjuezub6iJVPNML5pW5ZQvtA9ocL')
def test_testnet(self): assert get_version(BITCOIN_ADDRESS_TEST) == 'test' assert get_version(BITCOIN_ADDRESS_TEST_COMPRESSED) == 'test'
def test_mainnet(self): assert get_version(BITCOIN_ADDRESS) == 'main' assert get_version(BITCOIN_ADDRESS_COMPRESSED) == 'main'
def test_mainnet_pay2sh(self): with pytest.raises(ValueError): get_version(BITCOIN_CASHADDRESS_PAY2SH)
def test_invalid(self): with pytest.raises(InvalidAddress): get_version('dg2dNAjuezub6iJVPNML5pW5ZQvtA9ocL')