Skip to content

Commit

Permalink
Create test_security.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Dec 1, 2024
1 parent 982f356 commit 5d52e08
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_security.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import unittest
from security import SecurityManager # Assuming you have a SecurityManager class

class TestSecurityManager(unittest.TestCase):
def setUp(self):
self.security_manager = SecurityManager()

def test_encryption(self):
original_data = "Sensitive Data"
encrypted_data = self.security_manager.encrypt(original_data)
self.assertNotEqual(original_data, encrypted_data)

def test_decryption(self):
original_data = "Sensitive Data"
encrypted_data = self.security_manager.encrypt(original_data)
decrypted_data = self.security_manager.decrypt(encrypted_data)
self.assertEqual(original_data, decrypted_data)

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

0 comments on commit 5d52e08

Please sign in to comment.