예제 #1
0
    def test0(self):
        """ Case to verify the wallet address from the wallet generated from private key
        """
        # Given, When
        wallet, _ = Wallet.create_wallet_by_private_key('71fc378d3a3fb92b57474af156f376711a8a89d277c9b60a923a1db75575b1cc')

        # Then
        self.assertEqual(wallet.get_address(), "hxcc7b1f5fb98ca1eeaf9586bc08048814cb0d4d3d")
예제 #2
0
    def test1(self):
        """ Case the private key is not composed of 32 bytes.
        """
        try:
            # Given, When
            wallet1, _ = Wallet.create_wallet_by_private_key(
                '71fc378d3a3fb92b57474af156f9d277c9b60a923a1db75575b1cc')

        # Then
        except TypeError:
            self.assertTrue(True)
예제 #3
0
    def test0(self):
        """ Case to create wallet successfully.
        """

        # Given, When
        wallet1, _ = Wallet.create_wallet_by_private_key(
            '71fc378d3a3fb92b57474af156f376711a8a89d277c9b60a923a1db75575b1cc')

        # Then
        self.assertEqual(wallet1.address,
                         "hxcc7b1f5fb98ca1eeaf9586bc08048814cb0d4d3d")