def test_to_cash_p2pkh_regtest(self): self.assertEqual(convert.to_cash_address('myBLa9Fc8oPpr3f2sVrBgt54oJmpJgzNRj', 1), 'bchreg:qrqmez5xq2eflsemd3davcn33jqa3er7vsu49r2qvf') self.assertEqual(convert.to_cash_address('bchreg:qrqmez5xq2eflsemd3davcn33jqa3er7vsu49r2qvf', 1), 'bchreg:qrqmez5xq2eflsemd3davcn33jqa3er7vsu49r2qvf')
def test_to_cash_p2sh_regtest(self): self.assertEqual(convert.to_cash_address('mfobxivZQPZ675fzd25VWU2JEM6w8yFUyn', 1), 'bchreg:qqpjvxg4gagz7j9mczyj2cvm0tsw4hdg5yjpu7jx08') self.assertEqual(convert.to_cash_address('bchreg:qqpjvxg4gagz7j9mczyj2cvm0tsw4hdg5yjpu7jx08', 1), 'bchreg:qqpjvxg4gagz7j9mczyj2cvm0tsw4hdg5yjpu7jx08')
def test_to_cash_p2pkh_testnet(self): self.assertEqual(convert.to_cash_address('mqp7vM7eU7Vu9NPH1V7s7pPg5FFBMo6SWK'), 'bchtest:qpc0qh2xc3tfzsljq79w37zx02kwvzm4gydm222qg8') self.assertEqual(convert.to_cash_address('bchtest:qpc0qh2xc3tfzsljq79w37zx02kwvzm4gydm222qg8'), 'bchtest:qpc0qh2xc3tfzsljq79w37zx02kwvzm4gydm222qg8')
def test_to_cash_p2sh_testnet(self): self.assertEqual(convert.to_cash_address('2MwikwR6hoVijCmr1u8UgzFMHFP6rpQyRvP'), 'bchtest:pqc3tyspqwn95retv5k3c5w4fdq0cxvv95u36gfk00') self.assertEqual(convert.to_cash_address('bchtest:pqc3tyspqwn95retv5k3c5w4fdq0cxvv95u36gfk00'), 'bchtest:pqc3tyspqwn95retv5k3c5w4fdq0cxvv95u36gfk00')
def test_to_cash_p2pkh(self): self.assertEqual(convert.to_cash_address('155fzsEBHy9Ri2bMQ8uuuR3tv1YzcDywd4'), 'bitcoincash:qqkv9wr69ry2p9l53lxp635va4h86wv435995w8p2h') self.assertEqual(convert.to_cash_address('bitcoincash:qqkv9wr69ry2p9l53lxp635va4h86wv435995w8p2h'), 'bitcoincash:qqkv9wr69ry2p9l53lxp635va4h86wv435995w8p2h')
def test_to_cash_p2sh(self): self.assertEqual(convert.to_cash_address('3CWFddi6m4ndiGyKqzYvsFYagqDLPVMTzC'), 'bitcoincash:ppm2qsznhks23z7629mms6s4cwef74vcwvn0h829pq') self.assertEqual(convert.to_cash_address('bitcoincash:ppm2qsznhks23z7629mms6s4cwef74vcwvn0h829pq'), 'bitcoincash:ppm2qsznhks23z7629mms6s4cwef74vcwvn0h829pq')