示例#1
0
def test_break_cipher_notenglish2():
    cipher = encrypt_('привет', 145)
    assert break_cipher(cipher) == "Not English"
示例#2
0
def test_break_cipher_notenglish():
    cipher = encrypt_('russkoeslovo', 145)
    assert break_cipher(cipher) == "Not English"
示例#3
0
def test_break_cipher_small_word():
    assert break_cipher('hfy') == 'cat'
示例#4
0
def test_break_cipher_small_sentence():
    assert break_cipher(
        "dcrt ndj zcdl paa iwt tatbtcih, xi'h cdi sxuuxrjai id ejaa idvtiwtg p htcitcrt"
    ) == "once you know all the elements, it's not difficult to pull together a sentence"
示例#5
0
def test_break_cipher_text():
    text = 'It was the best of times, it was the worst of times'

    cipher = encrypt_(text, 5)

    assert break_cipher(cipher) == text.lower()