Beispiel #1
0
 def test_encode_no(self):
     self.assertMultiLineEqual(encode("no"), "ml")
Beispiel #2
0
 def test_encode_all_things(self):
     plaintext = "The quick brown fox jumps over the lazy dog."
     ciphertext = "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"
     self.assertMultiLineEqual(encode(plaintext), ciphertext)
Beispiel #3
0
 def test_encode_decode(self):
     self.assertMultiLineEqual(decode(encode("Testing, 1 2 3, testing.")),
                               "testing123testing")
Beispiel #4
0
 def test_encode_sentence(self):
     self.assertMultiLineEqual(encode("Truth is fiction."),
                               "gifgs rhurx grlm")
Beispiel #5
0
 def test_encode_numbers(self):
     self.assertMultiLineEqual(encode("Testing, 1 2 3, testing."),
                               "gvhgr mt123 gvhgr mt")
Beispiel #6
0
 def test_encode_long_word(self):
     self.assertMultiLineEqual(encode("mindblowingly"), "nrmwy oldrm tob")
Beispiel #7
0
 def test_encode_O_M_G(self):
     self.assertMultiLineEqual(encode("O M G"), "lnt")
Beispiel #8
0
 def test_encode_yes(self):
     self.assertMultiLineEqual(encode("yes"), "bvh")