-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathtest_loadCasesAndCombinations.py
38 lines (29 loc) · 1.25 KB
/
test_loadCasesAndCombinations.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import sys
import os
PROJECT_ROOT = os.path.abspath(os.path.join(
os.path.dirname(__file__),
os.pardir)
)
sys.path.append(PROJECT_ROOT)
from RFEM.initModel import Model
from RFEM.LoadCasesAndCombinations.loadCasesAndCombinations import LoadCasesAndCombinations
if Model.clientModel is None:
Model()
def test_load_cases_and_combinations():
Model.clientModel.service.delete_all()
Model.clientModel.service.begin_modification()
LoadCasesAndCombinations(
params = {
"current_standard_for_combination_wizard": 6237,
"activate_combination_wizard_and_classification": True,
"activate_combination_wizard": True,
"result_combinations_active": True,
"result_combinations_parentheses_active": False,
"result_combinations_consider_sub_results": False,
"combination_name_according_to_action_category": False})
Model.clientModel.service.finish_modification()
combConfig = Model.clientModel.service.get_load_cases_and_combinations()
assert combConfig.current_standard_for_combination_wizard == 6237
assert combConfig.result_combinations_parentheses_active == False
# Return LoadCases and Combinations to the original state
LoadCasesAndCombinations()