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

18 lines
605 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):
# distances_true = {1: [0, 0, 0, 0, 40, 0, 31, 22]}
# distances_false = {1: [33, 14, 23, 29, 0, 28, 0, 0]}
2023-12-09 19:52:07 +00:00
def test_encrypt_1(self):
assert encrypt(strng='vclr.q7@', key=41) == '@-6<W;`i'
2023-12-09 19:52:07 +00:00
class Test_decrypt(TestCase):
# distances_true = {2: [0, 0, 1, 0, 0, 3, 1, 18, 48]}
# distances_false = {2: [1, 3, 0, 15, 6, 0, 0, 0, 0]}
2023-12-09 19:52:07 +00:00
def test_decrypt_1(self):
assert decrypt(strng='203$-53Db', key=19) == '~| py" 1O'