def METHOD_NAME(project_with_runs):
    """Test getting upstream of an activity."""
    activity = next(p for p in Activity.list() if p.plan.name == "plan-1")
    assert [] == activity.preceding_activities
    activity = next(p for p in Activity.list() if p.plan.name == "plan-2")
    upstreams = activity.preceding_activities
    assert 1 == len(upstreams)
    assert "plan-1" == upstreams[0].plan.name