def METHOD_NAME(run_thread, clean_ui):
    emsg = r"You are trying to fit a model which has a discrete template model component with a continuous optimization method. Since CIAO4.6 this is not possible anymore. Please use gridsearch as the optimization method and make sure that the 'sequence' option is correctly set, or enable interpolation for the templates you are loading \(which is the default behavior\)."
    with pytest.raises(ModelErr, match=emsg):
        run_thread('load_template_without_interpolation',
                   scriptname='test_case_3.2.py')