def METHOD_NAME(self):
    def constant_current(variables):
        I = variables["Current [A]"]
        return I + 1
    # load models
    models = [
        pybamm.lithium_ion.SPM(),
        pybamm.lithium_ion.SPM({"operating mode": constant_current}),
    ]
    # load parameter values and process models and geometry
    params = [model.default_parameter_values for model in models]
    # First model: 1A charge
    params[0]["Current function [A]"] = -1
    # set parameters and discretise models
    for i, model in enumerate(models):
        # create geometry
        geometry = model.default_geometry
        params[i].process_model(model)
        params[i].process_geometry(geometry)
        mesh = pybamm.Mesh(
            geometry, model.default_submesh_types, model.default_var_pts
        )
        disc = pybamm.Discretisation(mesh, model.default_spatial_methods)
        disc.process_model(model)
    # solve model
    solutions = [None] * len(models)
    t_eval = np.linspace(0, 3600, 100)
    for i, model in enumerate(models):
        solutions[i] = model.default_solver.solve(model, t_eval)
    np.testing.assert_array_almost_equal(
        solutions[0]["Discharge capacity [A.h]"].entries,
        solutions[0]["Current [A]"].entries * solutions[0]["Time [h]"].entries,
    )
    np.testing.assert_array_almost_equal(
        solutions[0]["Voltage [V]"](solutions[0].t),
        solutions[1]["Voltage [V]"](solutions[0].t),
        decimal=5,
    )