diff --git a/watertap/unit_models/tests/test_surrogate_crystallizer.py b/watertap/unit_models/tests/test_surrogate_crystallizer.py index dbbcc64b6a..87ca5335fa 100644 --- a/watertap/unit_models/tests/test_surrogate_crystallizer.py +++ b/watertap/unit_models/tests/test_surrogate_crystallizer.py @@ -80,11 +80,22 @@ def add_crystallizer_rbf_model( block_name = "crystallizer_surrogate" + "_" + filename[sm] blk.add_component(block_name, SurrogateBlock(concrete=True)) surrogate_name = f"{filename[sm]}.json" - with importlib.resources.path( - "watertap.data.surrogate_defaults.surrogate_crystallizer_defaults", + # with importlib.resources.path( + # "watertap.data.surrogate_defaults.surrogate_crystallizer_defaults", + # surrogate_name, + # ) as json_path: + # current_surrogate = PysmoSurrogate.load_from_file(str(json_path)) + surrogate_path = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "..", + "data", + "surrogate_defaults", + "surrogate_crystallizer_defaults", surrogate_name, - ) as json_path: - current_surrogate = PysmoSurrogate.load_from_file(str(json_path)) + ) + current_surrogate = PysmoSurrogate.load_from_file(surrogate_path) + getattr(blk, block_name).build_model( current_surrogate, input_vars=crystallizer_inputs,