From fe3c22e21720fd8853b92b2f923331a3d282a3d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Roos?= Date: Fri, 22 Sep 2023 08:15:35 +0200 Subject: [PATCH] add unit test --- tests/composite_model_test.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/composite_model_test.py b/tests/composite_model_test.py index 04b13aa89..015ed795b 100644 --- a/tests/composite_model_test.py +++ b/tests/composite_model_test.py @@ -83,6 +83,17 @@ def test_basic_functionality_of_composite_model(dpf_server, data_files, distribu assert [ply["id"] for ply in sampling_point.analysis_plies] == analysis_ply_ids + ref_material_names = { + 'Epoxy Carbon UD (230 GPa) Prepreg': 3, + 'Epoxy Carbon Woven (230 GPa) Wet': 2, + 'Honeycomb': 4, + 'Structural Steel': 1 + } + mat_names = composite_model.material_names + assert len(mat_names) == len(ref_material_names) + for mat_name, dpf_mat_id in ref_material_names.items(): + assert mat_names[mat_name] == dpf_mat_id + timer.add("After getting properties") timer.summary()