def test_decrypt_empty_string(self): self.assertEqual(decrypt_annotated_block("", CryptoTest.TEST_PAIRS), "")
def test_wrong_key_fails(self): for _, encrypted in CryptoTest.TEST_PAIRS: with self.assertRaises(DecryptException): decrypt_annotated_block(encrypted, 'wrong' + CryptoTest.TEST_KEY)
def test_decrypt(self): for plaintext, encrypted in CryptoTest.TEST_PAIRS: self.assertEqual( decrypt_annotated_block(encrypted, CryptoTest.TEST_KEY), plaintext)
def test_decrypt(self): for plaintext, encrypted in CryptoTest.TEST_PAIRS: self.assertEqual(decrypt_annotated_block(encrypted, CryptoTest.TEST_KEY), plaintext)