def test_sso_authentication_sync(make_sso_auth_request, sso_session_teppo, sso_format_datetime):
user, error = make_sso_auth_request(sso_session_teppo)
sso_session_teppo["services"]["IDA"]["projects"] = ["fd_teppo3_project", "new_project"]
sso_session_teppo["initiated"] = sso_format_datetime(
parse(sso_session_teppo["initiated"]) + timedelta(hours=1)
)
# session is newer than previous sync, should sync user details
user, error = make_sso_auth_request(sso_session_teppo)
assert user.csc_projects == ["fd_teppo3_project", "new_project"]
assert error == None