-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathtest_SectionDialogue.py
52 lines (40 loc) · 1.6 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
51
52
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.connectionGlobals import url
from RFEM.Tools.sectionDialogue import *
from RFEM.BasicObjects.section import Section
from RFEM.BasicObjects.material import Material
import pytest
if Model.clientModel is None:
Model()
@pytest.mark.skipif(url != 'http://127.0.0.1', reason="This test fails on remote PC due to incorrect file path. \
Althought it is easy to change, it would not be easy to update on every remote computer.\
It is not necessary to evaluate Client as functional. Localy this tests still gets executed.")
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
CreateSectionList("Favs_1")
CreateSectionList("Favs_2")
#Add Section to Favorite List
AddSectionToMySectionList("Favs_1", "IPE 300")
AddSectionToMySectionList("Favs_1", "HEA 200")
#Delete Section From Favorite List
DeleteSectionFromSectionList("Favs_1", "HEA 200")
#Get Section Favorite List
GetMySectionLists()
#Delete Section Favorite List
DeleteSectionList("Favs_2")
DeleteSectionList("Favs_1")
#Create Section from Rsection File
CreateSectionFromRsectionFile(3, os.path.dirname(__file__)+'\\src\\rsection_test.rsc')
Model.clientModel.service.finish_modification()