MCPcopy Index your code
hub / github.com/realpython/discover-flask / test_check_password

Method test_check_password

tests/test_users.py:49–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47
48 # Ensure given password is correct after unhashing
49 def test_check_password(self):
50 user = User.query.filter_by(email='ad@min.com').first()
51 self.assertTrue(bcrypt.check_password_hash(user.password, 'admin'))
52 self.assertFalse(bcrypt.check_password_hash(user.password, 'foobar'))
53
54
55class UserViewsTests(BaseTestCase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected