Example #1
0
 def test_generated_passphrase_entropy(self):
     passp = Passphrase('internal')
     passp.amount_n = 1
     passp.amount_w = 1
     self.assertAlmostEqual(passp.generated_passphrase_entropy(),
                            32.70,
                            places=2)
Example #2
0
 def test_generated_passphrase_entropy(self):
     passp = Passphrase()
     self.assertRaises(ValueError, passp.generated_passphrase_entropy)
     passp.load_internal_wordlist()
     self.assertRaises(ValueError, passp.generated_passphrase_entropy)
     passp.amount_n = 0
     self.assertRaises(ValueError, passp.generated_passphrase_entropy)
     passp.amount_w = 0
     self.assertEqual(passp.generated_passphrase_entropy(), 0.0)