def METHOD_NAME(mocker: MockerFixture, make_snapshot):
    model = SqlModel(name="test_model", query=d.parse_one("SELECT 1 AS a"))
    state_reader_mock = mocker.Mock()
    state_reader_mock.get_environment.return_value = None
    local_models: UniqueKeyDict[str, Model] = UniqueKeyDict("models")
    local_models[model.name] = model
    selector = Selector(state_reader_mock, local_models)
    with pytest.raises(SQLMeshError):
        selector.select_models([model.name], "missing_env")
    with pytest.raises(SQLMeshError):
        selector.select_models([model.name], "missing_env", fallback_env_name="another_missing_env")
    state_reader_mock.get_environment.assert_has_calls(
        [
            call("missing_env"),
            call("missing_env"),
            call("another_missing_env"),
        ]
    )