def decode(self, code): return Vigenere.decode(code, self.key)
def encode(self, text): return Vigenere.encode(text, self.key)
def test_decode(self): code = Vigenere.encode(self.text, self.key) decoded = Vigenere.decode(code, self.key) self.assertEqual(decoded, self.text)
def decode(self, code): return Vigenere.decode((self.text, self.key))
def test_encode(self): code = Vigenere.encode(self.text, self.key) self.assertNotEqual(code, self.text) self.assertEqual(len(code), len(self.text))