def METHOD_NAME(
    AutoMLTestEnv,
    dummy_regressor_estimator_class,
    dummy_regression_pipeline,
    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={
            "Mock Regression Pipeline": [dummy_regressor_estimator_class],
        },
        allowed_model_families=[ModelFamily.RANDOM_FOREST],
        automl_algorithm="iterative",
    )
    expected_pipelines = [dummy_regression_pipeline]
    assert_allowed_pipelines_equal_helper(automl.allowed_pipelines, expected_pipelines)
    assert set(automl.allowed_model_families) == set(
        [p.model_family for p in expected_pipelines],
    )
    env = AutoMLTestEnv("regression")
    with env.test_context(score_return_value={automl.objective.name: 1.0}):
        automl.search()
    env.mock_fit.assert_called()
    env.mock_score.assert_called()