Add test about reading password hash

issue5795
review32441002
This commit is contained in:
Cédric Krier committed 2016-08-30 12:13:31 +02:00
1 parent 2e69e4faf6
commit cbed031e22
1 file changed
+7
+7
View File
@@ -37,6 +37,7 @@ class UserTestCase(unittest.TestCase):
User.write([user], {
'password': password,
})
return user
def check_user(self, login, password):
pool = Pool()
@@ -72,6 +73,12 @@ class UserTestCase(unittest.TestCase):
self.create_user('user', '12345', 'bcrypt')
self.check_user('user', '12345')
@with_transaction()
def test_read_password_hash(self):
"Test password_hash can not be read"
user = self.create_user('user', '12345')
self.assertIsNone(user.password_hash)
def suite():
return unittest.TestLoader().loadTestsFromTestCase(UserTestCase)