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