示例#1
0
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
示例#2
0
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()
示例#3
0
def test_encrypts_missing_url():
    with pytest.raises(ValueError):
        mbc.encrypts("Hello World", "")
示例#4
0
def test_encrypts_missing_message():
    with pytest.raises(ValueError):
        mbc.encrypts("", url)