Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ansys/rep/client/jms/schema/task_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Meta(BaseSchema.Meta):
fields.String(), allow_none=True, description="A list of expressions to be evaluated."
)

required_output_files = IdReferenceList(
required_output_file_ids = IdReferenceList(
"File",
attribute="required_output_file_ids",
allow_none=True,
Expand All @@ -66,7 +66,7 @@ class Meta(BaseSchema.Meta):
allow_none=True, description="Flag to require all output files."
)

required_output_parameters = IdReferenceList(
required_output_parameter_ids = IdReferenceList(
"ParameterDefinition",
attribute="required_output_parameter_ids",
allow_none=True,
Expand Down
6 changes: 5 additions & 1 deletion tests/jms/test_task_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ def test_task_definition_serialization(self):
expressions=[],
require_all_output_files=False,
require_all_output_parameters=True,
required_output_file_ids=["id1", "id2"],
required_output_parameter_ids=["id3", "id4"],
return_code=0,
),
use_execution_script=False,
Expand Down Expand Up @@ -213,13 +215,15 @@ def test_task_definition_serialization(self):
"FAKE_FILE_ID",
],
)
self.assertEqual(
self.assertDictEqual(
serialized_task_def["success_criteria"],
OrderedDict(
{
"return_code": 0,
"expressions": [],
"required_output_file_ids": ["id1", "id2"],
"require_all_output_files": False,
"required_output_parameter_ids": ["id3", "id4"],
"require_all_output_parameters": True,
}
),
Expand Down
2 changes: 2 additions & 0 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def test_mapdl_motorbike_frame(self):
project_api = ProjectApi(self.client, project.id)

self.assertEqual(len(project_api.get_jobs()), num_jobs)
td = project_api.get_task_definitions()[0]
self.assertEqual(len(td.success_criteria.required_output_file_ids), 1)

jms_api.delete_project(project)

Expand Down