diff --git a/biosimulators_pysces/core.py b/biosimulators_pysces/core.py index f1c5fbd..5c4b319 100644 --- a/biosimulators_pysces/core.py +++ b/biosimulators_pysces/core.py @@ -132,7 +132,7 @@ def exec_sed_task(task, variables, log=None): if setting is None: if ( ALGORITHM_SUBSTITUTION_POLICY_LEVELS[algorithm_substitution_policy] - <= ALGORITHM_SUBSTITUTION_POLICY_LEVELS[AlgorithmSubstitutionPolicy.SAME_METHOD] + <= ALGORITHM_SUBSTITUTION_POLICY_LEVELS[AlgorithmSubstitutionPolicy.NONE] ): msg = "".join([ "Algorithm parameter with KiSAO id '{}' is not supported. ".format(change.kisao_id), @@ -155,7 +155,7 @@ def exec_sed_task(task, variables, log=None): if not validate_str_value(value, setting['type']): if ( ALGORITHM_SUBSTITUTION_POLICY_LEVELS[algorithm_substitution_policy] - <= ALGORITHM_SUBSTITUTION_POLICY_LEVELS[AlgorithmSubstitutionPolicy.SAME_METHOD] + <= ALGORITHM_SUBSTITUTION_POLICY_LEVELS[AlgorithmSubstitutionPolicy.NONE] ): msg = "'{}' is not a valid {} value for parameter {}".format( value, setting['type'].name, change.kisao_id) diff --git a/tests/test_core_main.py b/tests/test_core_main.py index d25a166..3cd8d0b 100644 --- a/tests/test_core_main.py +++ b/tests/test_core_main.py @@ -103,7 +103,7 @@ def test_exec_sed_task_successfully(self): self.assertFalse(numpy.any(numpy.isnan(results))) def test_exec_sed_task_error_handling(self): - with mock.patch.dict('os.environ', {'ALGORITHM_SUBSTITUTION_POLICY': 'SAME_METHOD'}): + with mock.patch.dict('os.environ', {'ALGORITHM_SUBSTITUTION_POLICY': 'NONE'}): task = sedml_data_model.Task( model=sedml_data_model.Model( source=os.path.join(os.path.dirname(__file__), 'fixtures', 'biomd0000000002.xml'), @@ -216,7 +216,7 @@ def test_exec_sed_task_error_handling(self): variables = [] task.simulation.algorithm.changes[0].new_value = 'not a number' - with mock.patch.dict('os.environ', {'ALGORITHM_SUBSTITUTION_POLICY': 'SAME_METHOD'}): + with mock.patch.dict('os.environ', {'ALGORITHM_SUBSTITUTION_POLICY': 'NONE'}): with self.assertRaisesRegex(ValueError, 'is not a valid'): core.exec_sed_task(task, variables) @@ -225,7 +225,7 @@ def test_exec_sed_task_error_handling(self): core.exec_sed_task(task, variables) task.simulation.algorithm.changes[0].kisao_id = 'KISAO_9999999' - with mock.patch.dict('os.environ', {'ALGORITHM_SUBSTITUTION_POLICY': 'SAME_METHOD'}): + with mock.patch.dict('os.environ', {'ALGORITHM_SUBSTITUTION_POLICY': 'NONE'}): with self.assertRaisesRegex(NotImplementedError, 'is not supported'): core.exec_sed_task(task, variables)