Skip to content

Commit

Permalink
Create test_crypto.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Sep 18, 2024
1 parent 4e1c172 commit ae4d128
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions crypto/test/test_crypto.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import unittest
from crypto_guard import CryptoGuard

class TestCryptoGuard(unittest.TestCase):
def test_encrypt(self):
# Test the encrypt method
crypto_guard = CryptoGuard()
encrypted_data = crypto_guard.encrypt("Hello, World!")
self.assertNotEqual(encrypted_data, "Hello, World!")

def test_decrypt(self):
# Test the decrypt method
crypto_guard = CryptoGuard()
encrypted_data = crypto_guard.encrypt("Hello, World!")
decrypted_data = crypto_guard.decrypt(encrypted_data)
self.assertEqual(decrypted_data, "Hello, World!")

if __name__ == "__main__":
unittest.main()

0 comments on commit ae4d128

Please sign in to comment.