def T(str_addr, expected_scriptPubKey_hexbytes):
            addr = CBitcoinAddress(str_addr)

            actual_scriptPubKey = addr.to_scriptPubKey()
            self.assertEqual(b2x(actual_scriptPubKey), expected_scriptPubKey_hexbytes)
 def T(base58_privkey, expected_hex_pubkey, expected_is_compressed_value):
     key = CBitcoinSecret(base58_privkey)
     self.assertEqual(b2x(key.pub), expected_hex_pubkey)
     self.assertEqual(key.is_compressed, expected_is_compressed_value)
 def T(redeemScript, expected_hex_bytes):
     redeemScript = CScript(redeemScript)
     actual_script = redeemScript.to_p2sh_scriptPubKey()
     self.assertEqual(b2x(actual_script), expected_hex_bytes)