Select Git revision
test_tools.py
-
Vincent Texier authored
See the RFC0014 of the Duniter Project https://git.duniter.org/documents/rfcs/blob/dubp-mnemonic/rfc/0014_Dubp_Mnemonic.md
Vincent Texier authoredSee the RFC0014 of the Duniter Project https://git.duniter.org/documents/rfcs/blob/dubp-mnemonic/rfc/0014_Dubp_Mnemonic.md
test_tools.py 593 B
import base64
import unittest
from duniterpy import tools
class TestTools(unittest.TestCase):
def test_dubp_mnemonic_to_seed(self):
"""
https://git.duniter.org/documents/rfcs/blob/dubp-mnemonic/rfc/0014_Dubp_Mnemonic.md
:return:
"""
mnemonic = (
"tongue cute mail fossil great frozen same social weasel impact brush kind"
)
seed = tools.dubp_mnemonic_to_seed(mnemonic)
self.assertEqual(
"qGdvpbP9lJe7ZG4ZUSyu33KFeAEs/KkshAp9gEI4ReY=",
base64.b64encode(seed).decode("utf-8"),
)