Skip to content
Snippets Groups Projects
Select Git revision
  • dd5d06343a35d6901b69a5429f492ff2e9ea1c17
  • main default protected
  • release/1.1
  • encrypt_comments
  • mnemonic_dewif
  • authors_rules
  • 0.14
  • rtd
  • 1.2.1 protected
  • 1.2.0 protected
  • 1.1.1 protected
  • 1.1.0 protected
  • 1.0.0 protected
  • 1.0.0rc1 protected
  • 1.0.0rc0 protected
  • 1.0.0-rc protected
  • 0.62.0 protected
  • 0.61.0 protected
  • 0.60.1 protected
  • 0.58.1 protected
  • 0.60.0 protected
  • 0.58.0 protected
  • 0.57.0 protected
  • 0.56.0 protected
  • 0.55.1 protected
  • 0.55.0 protected
  • 0.54.3 protected
  • 0.54.2 protected
28 results

test_tools.py

Blame
  • 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"),
            )