def test_rotate_back_again(): cipher = Fleissner(key="XooooXoXoooooXoo") rotated = cipher.rotate(cipher.grille) assert [("X", "o", "o", "o"), ("o", "X", "o", "X"), ("o", "o", "o", "o"), ("o", "X", "o", "o")] == cipher.rotate(rotated, clockwise=False)
def test_rotate(): cipher = Fleissner(key="XooooXoXoooooXoo") assert [("o", "o", "o", "X"), ("X", "o", "X", "o"), ("o", "o", "o", "o"), ("o", "o", "X", "o")] == cipher.rotate(cipher.grille)