def test_password_hash_match(mongodb): user = User() user.username = "******" user.set_password("ice cream rocks") assert user.check_password("ice cream rocks") == True assert user.check_password("fish socks win") == False