]> SALOME platform Git repositories - modules/shaper.git/blob - src/ExchangeAPI/Test/TestExchange.py
Salome HOME
Fix tests fot ExchangePlugin
[modules/shaper.git] / src / ExchangeAPI / Test / TestExchange.py
1 import unittest
2
3 import ModelAPI
4 import ExchangeAPI
5
6 class ExchangeTestCase(unittest.TestCase):
7
8     def setUp(self):
9         self.session = ModelAPI.ModelAPI_Session.get()
10         self.doc = self.session.moduleDocument()
11
12     def tearDown(self):
13         self.session.closeAll()
14
15     def test_addImport(self):
16         self.session.startOperation()
17         self.feature = ExchangeAPI.addImport(self.doc, "file_path")
18         self.session.finishOperation()
19
20     def test_addExport(self):
21         self.session.startOperation()
22         self.feature = ExchangeAPI.exportToFile(self.doc, "file_path", [], "file_format")
23         self.session.finishOperation()
24
25 if __name__ == "__main__":
26     unittest.main()