示例#1
0
 def test_decrypt_empty_string(self):
     self.assertEqual(decrypt_annotated_block("", CryptoTest.TEST_PAIRS),
                      "")
示例#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)
示例#3
0
 def test_decrypt(self):
     for plaintext, encrypted in CryptoTest.TEST_PAIRS:
         self.assertEqual(
             decrypt_annotated_block(encrypted, CryptoTest.TEST_KEY),
             plaintext)
示例#4
0
文件: tests.py 项目: muccg/yabi
 def test_decrypt_empty_string(self):
     self.assertEqual(decrypt_annotated_block("", CryptoTest.TEST_PAIRS), "")
示例#5
0
文件: tests.py 项目: 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)
示例#6
0
文件: tests.py 项目: muccg/yabi
 def test_decrypt(self):
     for plaintext, encrypted in CryptoTest.TEST_PAIRS:
         self.assertEqual(decrypt_annotated_block(encrypted, CryptoTest.TEST_KEY), plaintext)