Added tests

This commit is contained in:
CasVT
2023-01-16 23:30:18 +01:00
parent 7a3b6c72d9
commit f025c403d3
14 changed files with 209 additions and 10 deletions

10
tests/security_test.py Normal file
View File

@@ -0,0 +1,10 @@
import unittest
from backend.security import generate_salt_hash, get_hash
class Test_Security(unittest.TestCase):
def test_hash(self):
for test_case in ('test', ''):
result = generate_salt_hash(test_case)
self.assertEqual(result[1], get_hash(result[0], test_case))