Пример #1
0
def pytest_funcarg__user(request):
    user = User(username="******")
    user.set_password("paul has a good password")
    user.save()
    return user
Пример #2
0
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