Пример #1
0
 def test_wordlist(self):
     passp = Passphrase()
     for wrongtype in constants.WRONGTYPES_LIST_TUPLE:
         with self.assertRaises(TypeError) as context:
             passp.wordlist = wrongtype
         self.assertIn('wordlist can only be list or tuple',
                       str(context.exception))
Пример #2
0
 def test_wordlist(self):
     passp = Passphrase()
     passp.wordlist = constants.WORDS
     self.assertEqual(passp.wordlist, list(constants.WORDS))