blob: 61cd9ab9ee462683664df312b81d1563d39b852f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
"""Test cases for some methods in login.py"""
import unittest
from wqflask.user_login import encode_password
class TestUserLogin(unittest.TestCase):
def test_encode_password(self):
"""
Test encode password
"""
pass_gen_fields = {
"salt": "salt",
"hashfunc": "sha1",
"iterations": 4096,
"keylength": 20,
}
self.assertEqual(
encode_password(pass_gen_fields,
"password").get("password"),
'4b007901b765489abead49d926f721d065a429c1')
|