def pytest_funcarg__user(request): user = User(username="******") user.set_password("paul has a good password") user.save() return user
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