def test_encrypt_decrypt_sentence_with_punctuation(self): self.plaintext = cipher.PlaintextMessage('Cat, dog@, .', 19) encrypted_text = self.plaintext.get_message_text_encrypted() self.ciphertext = cipher.CiphertextMessage(encrypted_text) self.assertEqual(self.ciphertext.decrypt_message(), (7, 'Cat, dog@, .'))
def test_encrypt_msg_with_number(self): self.plaintext = cipher.PlaintextMessage('5 carpet', 19) self.assertEqual(self.plaintext.get_message_text_encrypted(), '5 vtkixm')
def test_encrypt_msg_with_capital_letters(self): self.plaintext = cipher.PlaintextMessage('BluEbErRy', 25) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'AktDaDqQx')
def test_encrypt_msg_shift_25(self): self.plaintext = cipher.PlaintextMessage('blueberry', 25) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'aktdadqqx')
def test_encrypt_msg_shift_23(self): self.plaintext = cipher.PlaintextMessage('juice', 23) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'grfzb')
def test_encrypt_msg_shift_21(self): self.plaintext = cipher.PlaintextMessage('duvet', 21) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'ypqzo')
def test_encrypt_msg_shift_19(self): self.plaintext = cipher.PlaintextMessage('carpet', 19) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'vtkixm')
def test_encrypt_msg_shift_17(self): self.plaintext = cipher.PlaintextMessage('baguette', 17) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'srxlvkkv')
def test_encrypt_msg_shift_15(self): self.plaintext = cipher.PlaintextMessage('rope', 15) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'gdet')
def test_encrypt_msg_shift_13(self): self.plaintext = cipher.PlaintextMessage('shirt', 13) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'fuveg')
def test_encrypt_msg_shift_11(self): self.plaintext = cipher.PlaintextMessage('wardrobe', 11) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'hlcoczmp')
def test_encrypt_msg_shift_9(self): self.plaintext = cipher.PlaintextMessage('rose', 9) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'axbn')
def test_encrypt_msg_shift_7(self): self.plaintext = cipher.PlaintextMessage('worm', 7) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'dvyt')
def test_encrypt_msg_shift_5(self): self.plaintext = cipher.PlaintextMessage('apple', 5) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'fuuqj')
def test_encrypt_msg_shift_3(self): self.plaintext = cipher.PlaintextMessage('cat', 3) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'fdw')
def test_encrypt_msg_shift_1(self): self.plaintext = cipher.PlaintextMessage('earth', 1) self.assertEqual(self.plaintext.get_message_text_encrypted(), 'fbsui')