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))
def test_wordlist(self): passp = Passphrase() passp.wordlist = constants.WORDS self.assertEqual(passp.wordlist, list(constants.WORDS))