def test_encrypt_decrypt_string_flex(): clear_text = "This is a secret message." cipher_arr = mbc.encrypts(clear_text, url, METHOD_FLEX) msg = mbc.decrypts(cipher_arr, url, METHOD_FLEX) assert msg == clear_text
def test_encrypt_decrypt_string_fast(): clear_text = "This is a secret message." cipher_arr = mbc.encrypts(clear_text, url, METHOD_FAST) msg = mbc.decrypts(cipher_arr, url, METHOD_FAST) assert msg == clear_text.lower()
def test_decrypts_missing_url(): with pytest.raises(ValueError): mbc.decrypts([0], "")
def test_decrypts_missing_arr(): with pytest.raises(ValueError): mbc.decrypts([], url)