def test_words_amount_needed(self): passp = Passphrase() passp.load_internal_wordlist() passp.entropy_bits_req = 77 passp.amount_n = 0 amount_w = passp.words_amount_needed() self.assertEqual(amount_w, 6) passp.import_words_from_file(self.words_file, False) amount_w = passp.words_amount_needed() self.assertEqual(amount_w, 30)
def test_words_amount_needed(self): passp = Passphrase() self.assertRaises(ValueError, passp.words_amount_needed) passp.amount_n = 1 self.assertRaises(ValueError, passp.words_amount_needed) passp.entropy_bits_req = 77 self.assertRaises(ValueError, passp.words_amount_needed) passp.load_internal_wordlist() self.assertEqual(passp.words_amount_needed(), 5)