20 lines
536 B
Python
20 lines
536 B
Python
|
from unittest import TestCase
|
||
|
from benchmark.caesar_cipher import encrypt
|
||
|
from benchmark.caesar_cipher import decrypt
|
||
|
|
||
|
|
||
|
class Test_encrypt(TestCase):
|
||
|
def test_encrypt_1(self):
|
||
|
assert encrypt(strng='(B{6M K', key=90) == '#=v1HzF'
|
||
|
|
||
|
def test_encrypt_2(self):
|
||
|
assert encrypt(strng='t3Cv', key=84) == 'i(8k'
|
||
|
|
||
|
|
||
|
class Test_decrypt(TestCase):
|
||
|
def test_decrypt_1(self):
|
||
|
assert decrypt(strng='4.J<IH{', key=11) == ')#?1>=p'
|
||
|
|
||
|
def test_decrypt_2(self):
|
||
|
assert decrypt(strng='5v8K', key=32) == 'tVw+'
|