Exemplo n.º 1
0
 def test_decrypt_empty_string(self):
     self.assertEqual(decrypt_annotated_block("", CryptoTest.TEST_PAIRS),
                      "")
Exemplo n.º 2
0
 def test_wrong_key_fails(self):
     for _, encrypted in CryptoTest.TEST_PAIRS:
         with self.assertRaises(DecryptException):
             decrypt_annotated_block(encrypted,
                                     'wrong' + CryptoTest.TEST_KEY)
Exemplo n.º 3
0
 def test_decrypt(self):
     for plaintext, encrypted in CryptoTest.TEST_PAIRS:
         self.assertEqual(
             decrypt_annotated_block(encrypted, CryptoTest.TEST_KEY),
             plaintext)
Exemplo n.º 4
0
Arquivo: tests.py Projeto: muccg/yabi
 def test_decrypt_empty_string(self):
     self.assertEqual(decrypt_annotated_block("", CryptoTest.TEST_PAIRS), "")
Exemplo n.º 5
0
Arquivo: tests.py Projeto: muccg/yabi
 def test_wrong_key_fails(self):
     for _, encrypted in CryptoTest.TEST_PAIRS:
         with self.assertRaises(DecryptException):
             decrypt_annotated_block(encrypted, 'wrong' + CryptoTest.TEST_KEY)
Exemplo n.º 6
0
Arquivo: tests.py Projeto: muccg/yabi
 def test_decrypt(self):
     for plaintext, encrypted in CryptoTest.TEST_PAIRS:
         self.assertEqual(decrypt_annotated_block(encrypted, CryptoTest.TEST_KEY), plaintext)