Exemple #1
0
def test_encrypt_bigkey27():
    assert encrypt_('cat', 27) == "dbu"
Exemple #2
0
def test_break_cipher_notenglish():
    cipher = encrypt_('russkoeslovo', 145)
    assert break_cipher(cipher) == "Not English"
Exemple #3
0
def test_break_cipher_notenglish2():
    cipher = encrypt_('привет', 145)
    assert break_cipher(cipher) == "Not English"
Exemple #4
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()
Exemple #5
0
def test_encrypt_normal():
    assert encrypt_('cat', 5) == "hfy"
Exemple #6
0
def test_encrypt_sentence_text():
    assert encrypt_(
        'In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.',
        7
    ) == "pu h ovsl pu aol nyvbuk aolyl spclk h oviipa. uva h uhzaf, kpyaf, dla ovsl, mpsslk dpao aol lukz vm dvytz huk hu vvgf ztlss, uvy fla h kyf, ihyl, zhukf ovsl dpao uvaopun pu pa av zpa kvdu vu vy av lha: pa dhz h oviipa-ovsl, huk aoha tlhuz jvtmvya."
Exemple #7
0
def test_encrypt_Capital195():  ## test if encrypt handling with capital letter
    assert encrypt_('Cat', 195) == "png"
Exemple #8
0
def test_encrypt_bigkey195():  ## test if encrypt handling with small letter
    assert encrypt_('cat', 195) == "png"