17 lines
464 B
Python
17 lines
464 B
Python
from src.codewars.kata_vigenere_cipher_helper import VigenereCipher
|
|
|
|
|
|
def test_cipher_helper():
|
|
abc = "abcdefghijklmnopqrstuvwxyz"
|
|
key = "password"
|
|
c = VigenereCipher(key, abc)
|
|
|
|
assert c.encode("codewars") == "rovwsoiv"
|
|
assert c.decode("rovwsoiv") == "codewars"
|
|
|
|
assert c.encode("waffles") == "laxxhsj"
|
|
assert c.decode("laxxhsj") == "waffles"
|
|
|
|
assert c.encode("CODEWARS") == "CODEWARS"
|
|
assert c.decode("CODEWARS") == "CODEWARS"
|