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/fuzzer_tests/test_caesar_cipher.py

18 lines
565 B
Python
Raw Normal View History

2023-12-24 13:55:34 +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, 6, 0, 10, 0, 0, 0, 0]}
# distances_false = {1: [48, 0, 60, 0, 57, 30, 25, 47]}
def test_encrypt_1(self):
assert encrypt(strng='_*k&hMH^', key=79) == 'Oy[uX=8N'
class Test_decrypt(TestCase):
# distances_true = {2: [0, 0, 32, 0]}
# distances_false = {2: [1, 12, 0, 24]}
def test_decrypt_1(self):
assert decrypt(strng='\\Q|E', key=61) == '~s?g'