def METHOD_NAME(
    AutoMLTestEnv,
    X_y_regression,
    assert_allowed_pipelines_equal_helper,
):
    X, y = X_y_regression
    automl = AutoMLSearch(
        X_train=X,
        y_train=y,
        problem_type="regression",
        allowed_component_graphs=None,
        allowed_model_families=[ModelFamily.RANDOM_FOREST],
        automl_algorithm="iterative",
    )
    expected_pipelines = [
        make_pipeline(X, y, estimator, ProblemTypes.REGRESSION)
        for estimator in get_estimators(
            ProblemTypes.REGRESSION,
            model_families=[ModelFamily.RANDOM_FOREST],
        )
    ]
    assert_allowed_pipelines_equal_helper(automl.allowed_pipelines, expected_pipelines)
    assert set(automl.allowed_model_families) == set([ModelFamily.RANDOM_FOREST])
    env = AutoMLTestEnv("regression")
    with env.test_context(score_return_value={automl.objective.name: 1.0}):
        automl.search()
    automl = AutoMLSearch(
        X_train=X,
        y_train=y,
        problem_type="regression",
        allowed_component_graphs=None,
        allowed_model_families=["random_forest"],
        automl_algorithm="iterative",
    )
    expected_pipelines = [
        make_pipeline(X, y, estimator, ProblemTypes.REGRESSION)
        for estimator in get_estimators(
            ProblemTypes.REGRESSION,
            model_families=[ModelFamily.RANDOM_FOREST],
        )
    ]
    assert_allowed_pipelines_equal_helper(automl.allowed_pipelines, expected_pipelines)
    assert set(automl.allowed_model_families) == set([ModelFamily.RANDOM_FOREST])
    with env.test_context(score_return_value={automl.objective.name: 1.0}):
        automl.search()
    env.mock_fit.assert_called()
    env.mock_score.assert_called()