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