def test_verify_login_valid(user_f):
    assert user_controller.verify_login(user_f.email, 'cocada_123')
def test_verify_login_invalid(user_f):
    with pytest.raises(ApiException) as e:
        user_controller.verify_login(user_f.email, 'lololo')

    assert e.value.code == 404
    assert e.value.reason == error_codes.LOGIN_INVALID
Beispiel #3
0
def login():
    user = user_controller.verify_login(request.json["email"], request.json["password"])
    login_user(user, True)

    return "ok", 200