This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
kse-02/tests/test_caesar_cipher.py

20 lines
536 B
Python
Raw Normal View History

2023-12-09 19:52:07 +00:00
from unittest import TestCase
from benchmark.caesar_cipher import encrypt
from benchmark.caesar_cipher import decrypt
class Test_encrypt(TestCase):
def test_encrypt_1(self):
assert encrypt(strng='(B{6M K', key=90) == '#=v1HzF'
def test_encrypt_2(self):
assert encrypt(strng='t3Cv', key=84) == 'i(8k'
class Test_decrypt(TestCase):
def test_decrypt_1(self):
assert decrypt(strng='4.J<IH{', key=11) == ')#?1>=p'
def test_decrypt_2(self):
assert decrypt(strng='5v8K', key=32) == 'tVw+'