コード例 #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))