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_descrypt_msg_shift10(self): self.ciphertext = cipher.CiphertextMessage("sxysaud") self.assertEqual(self.ciphertext.decrypt_message(), (10, "chicken"))
def test_descrypt_msg_shift8(self): self.ciphertext = cipher.CiphertextMessage("xslzwj") self.assertEqual(self.ciphertext.decrypt_message(), (8, "father"))
def test_descrypt_msg_shift6(self): self.ciphertext = cipher.CiphertextMessage("giomy") self.assertEqual(self.ciphertext.decrypt_message(), (6, "mouse"))
def test_descrypt_msg_shift4(self): self.ciphertext = cipher.CiphertextMessage("jkjoajoa") self.assertEqual(self.ciphertext.decrypt_message(), (4, "nonsense"))
def test_descrypt_msg_shift2(self): self.ciphertext = cipher.CiphertextMessage("pybgm") self.assertEqual(self.ciphertext.decrypt_message(), (2, "radio"))
def test_descrypt_msg_with_capital_letters(self): self.ciphertext = cipher.CiphertextMessage("GiOmY") self.assertEqual(self.ciphertext.decrypt_message(), (6, "MoUsE"))
def test_descrypt_msg_with_number(self): self.ciphertext = cipher.CiphertextMessage("hgriute 10") self.assertEqual(self.ciphertext.decrypt_message(), (20, "balcony 10"))
def test_descrypt_msg_shift22(self): self.ciphertext = cipher.CiphertextMessage("nierw") self.assertEqual(self.ciphertext.decrypt_message(), (22, "jeans"))
def test_descrypt_msg_shift24(self): self.ciphertext = cipher.CiphertextMessage("wpkxgtukva") self.assertEqual(self.ciphertext.decrypt_message(), (24, "university"))
def test_descrypt_msg_shift20(self): self.ciphertext = cipher.CiphertextMessage("hgriute") self.assertEqual(self.ciphertext.decrypt_message(), (20, "balcony"))
def test_descrypt_msg_shift18(self): self.ciphertext = cipher.CiphertextMessage("aqabmz") self.assertEqual(self.ciphertext.decrypt_message(), (18, "sister"))
def test_descrypt_msg_shift16(self): self.ciphertext = cipher.CiphertextMessage("mrksb") self.assertEqual(self.ciphertext.decrypt_message(), (16, "chair"))
def test_descrypt_msg_shift14(self): self.ciphertext = cipher.CiphertextMessage("oaybgfqd") self.assertEqual(self.ciphertext.decrypt_message(), (14, "computer"))
def test_descrypt_msg_shift12(self): self.ciphertext = cipher.CiphertextMessage("ghfok") self.assertEqual(self.ciphertext.decrypt_message(), (12, "straw"))