예제 #1
0
 def test_testnet(self):
     assert wif_to_bytes(WALLET_FORMAT_TEST) == (PRIVATE_KEY_BYTES, False, 'test')
예제 #2
0
 def test_mainnet(self):
     assert wif_to_bytes(WALLET_FORMAT_MAIN) == (PRIVATE_KEY_BYTES, False, 'main')
예제 #3
0
 def test_invalid_network(self):
     with pytest.raises(ValueError):
         wif_to_bytes(BITCOIN_ADDRESS)
예제 #4
0
 def test_testnet_compressed(self):
     assert wif_to_bytes(WALLET_FORMAT_COMPRESSED_TEST) == (
         PRIVATE_KEY_BYTES,
         True,
         "test",
     )
예제 #5
0
 def test_compressed(self):
     assert wif_to_bytes(WALLET_FORMAT_COMPRESSED_MAIN) == (
         PRIVATE_KEY_BYTES,
         True,
         "main",
     )
예제 #6
0
 def test_regtest(self):
     assert wif_to_bytes(WALLET_FORMAT_REGTEST, regtest=True) == (
         PRIVATE_KEY_BYTES,
         False,
         "regtest",
     )