Пример #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_decrypts_missing_url():
    with pytest.raises(ValueError):
        mbc.decrypts([0], "")
Пример #4
0
def test_decrypts_missing_arr():
    with pytest.raises(ValueError):
        mbc.decrypts([], url)