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
570 B
Python
Raw Permalink 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):
2023-12-27 15:07:31 +00:00
# distances_true = {1: [24, 61, 0, 0, 48, 5]}
# distances_false = {1: [0, 0, 12, 18, 0, 0]}
2023-12-24 13:55:34 +00:00
def test_encrypt_1(self):
2023-12-27 15:07:31 +00:00
assert encrypt(strng='P+sy8c', key=23) == 'gB+1Oz'
2023-12-24 13:55:34 +00:00
class Test_decrypt(TestCase):
2023-12-27 15:07:31 +00:00
# distances_true = {2: [9, 0, 43, 25, 0, 8, 42]}
# distances_false = {2: [0, 8, 0, 0, 5, 0, 0]}
2023-12-24 13:55:34 +00:00
def test_decrypt_1(self):
2023-12-27 15:07:31 +00:00
assert decrypt(strng='VFxfIUw', key=46) == "(wJ8z'I"