17 lines
585 B
Python
17 lines
585 B
Python
from unittest import TestCase
|
|
from benchmark.caesar_cipher import encrypt
|
|
from benchmark.caesar_cipher import decrypt
|
|
|
|
|
|
class Test_encrypt(TestCase):
|
|
# distances_true = {1: [0, 19, 0, 0, 0, 0]}
|
|
# distances_false = {1: [66, 0, 3, 31, 33, 53]}
|
|
def test_encrypt_1(self):
|
|
assert encrypt(strng='w#8TVj', key=73) == 'al">@T'
|
|
|
|
|
|
class Test_decrypt(TestCase):
|
|
# distances_true = {2: [0, 0, 0, 223, 18, 37, 0, 29]}
|
|
# distances_false = {2: [18, 16, 11, 0, 0, 0, 14, 0]}
|
|
def test_decrypt_1(self):
|
|
assert decrypt(strng='027 Sf4^', key=34) == 'motþ1Dq<'
|