Beispiel #1
0
def test_decode_long():
    #   https://www.lipsum.com
    test_str = 'ORUHP LSVXP GRORU VLW DPHW FRQVHFWHWXU DGLSLVFLQJ HOLW PDXULV DXJXH QLVL VROOLFLWXGLQ LG VDJLWWLV VHG ' \
               'WULVWLTXH YHO LSVXP SURLQ DOLTXDP OXFWXV PDXULV '
    assert cc.decode(
        test_str,
        3) == 'LOREM IPSUM DOLOR SIT AMET CONSECTETUR ADIPISCING ELIT MAURIS AUGUE NISI SOLLICITUDIN ID SAGITTIS SED ' \
              'TRISTIQUE VEL IPSUM PROIN ALIQUAM LUCTUS MAURIS '
Beispiel #2
0
def test_decode_invalid_char():
    test_str = 'ab_34_$%'
    assert cc.decode(test_str, 3) == 'ab_34_$%'
Beispiel #3
0
def test_decode():
    test_str = 'DEFGABC'
    assert cc.decode(test_str, 3) == 'ABCDXYZ'