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_encrypts_missing_url(): with pytest.raises(ValueError): mbc.encrypts("Hello World", "")
def test_encrypts_missing_message(): with pytest.raises(ValueError): mbc.encrypts("", url)