forked from dlubal-software/RFEM_Python_Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_SectionDialogue.py
50 lines (38 loc) · 1.47 KB
/
test_SectionDialogue.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
39
40
41
42
43
44
45
46
47
48
49
50
import sys
import os
import pytest
PROJECT_ROOT = os.path.abspath(os.path.join(
os.path.dirname(__file__),
os.pardir)
)
sys.path.append(PROJECT_ROOT)
from RFEM.initModel import Model, CheckIfMethodOrTypeExists
from RFEM.Tools.sectionDialogue import *
from RFEM.BasicObjects.section import Section
from RFEM.BasicObjects.material import Material
if Model.clientModel is None:
Model()
#TODO: US-8351
@pytest.mark.skipif(CheckIfMethodOrTypeExists(Model.clientModel,'create_section_favorite_list', True), reason="create_section_favorite_list not in RFEM GM yet")
def test_section_dialogue():
Model.clientModel.service.delete_all()
Model.clientModel.service.begin_modification()
Material()
Section(1, "IPE 300")
Section(2, "HEA 200")
#Create a Section Favorite List
CreateSectionFavoriteList("Favs_1")
CreateSectionFavoriteList("Favs_2")
#Add Section to Favorite List
AddSectionToFavoriteList("Favs_1", "IPE 300")
AddSectionToFavoriteList("Favs_1", "HEA 200")
#Delete Section From Favorite List
DeleteSectionFromFavoriteList("Favs_1", "HEA 200")
#Get Section Favorite List
GetSectionFavoriteLists()
#Delete Section Favorite List
DeleteSectionFavoriteList("Favs_2")
DeleteSectionFavoriteList("Favs_1")
#Create Section from Rsection File
CreateSectionFromRsectionFile(3, os.path.dirname(__file__)+'\\src\\rsection_test.rsc')
Model.clientModel.service.finish_modification()