Example #1
0
 def test_generated_password_entropy(self):
     passp = Passphrase()
     self.assertRaises(ValueError, passp.generated_password_entropy)
     passp.passwordlen = 0
     self.assertEqual(passp.generated_password_entropy(), 0.0)
Example #2
0
 def test_generated_password_entropy(self):
     passp = Passphrase()
     passp.passwordlen = 1
     self.assertAlmostEqual(passp.generated_password_entropy(),
                            6.55,
                            places=2)