def METHOD_NAME(client, project, user):
    project.access = Access.PRIVATE
    project.save()
    project_url = reverse('project-detail', args=[project.slug])
    response = client.get(project_url)
    assert response.status_code == 302
    assert redirect_target(response) == 'account_login'
    client.login(username=user.email, password='password')
    response = client.get(project_url)
    assert response.status_code == 302
    assert redirect_target(response) == 'memberships-request'
    project.participants.add(user)
    response = client.get(project_url)
    assert response.status_code == 200
    assert response.context_data['view'].project == project